Zhou Zheng Sheng has posted comments on this change.
Change subject: AdvancedStatsThread: Rotate duplicated stats log
......................................................................
Patch Set 2: (4 inline comments)
Thanks Mark. I can try to submit another patch for cutting down the noise. This
patch will be only for log rotation.
....................................................
File vdsm/libvirtvm.py
Line 57: MBPS_TO_BPS = 10 ** 6 / 8
Line 58:
Line 59: def __init__(self, vm):
Line 60: log = vm.getVMLogger(utils.AdvancedStatsThread.DEFAULT_LOG)
Line 61: utils.AdvancedStatsThread.__init__(self, log=log, daemon=True)
That will have to change the interface of AdvancedStatsThread. For now,
AdvancedStatsThread is only used by VmStatsThread to log VmStats, but
AdvancedStatsThread is actually a general stats thread implementation, it can
be used elsewhere. So I think we'd better keep it separate from vmid.
Line 62: self._vm = vm
Line 63:
Line 64: self.highWrite = (
Line 65: utils.AdvancedStatsFunction(
....................................................
File vdsm/logger.conf.in
Line 38:
Line 39: [logger_Stats]
Line 40: level=DEBUG
Line 41: handlers=rotatefile
Line 42: qualname=Stats
Thanks Mark, I thought about it a little bit before I submited it.
My thought is that for this patch we can just propose a separated file for all
the stats. If we need VmStats, diskStats, xxxStats in future, we can submit new
patches to do that.
Line 43: propagate=0
Line 44:
Line 45: [handler_syslog]
Line 46: level=WARNING
Line 66: args: []
Line 67: formatter: none
Line 68:
Line 69: [handler_rotatefile]
Line 70: class=logging.handlers.RotatingFileHandler
logrotate can not rotate the log very often. Typical usage of logrotate perform
the work several times during the day. RotatingFileHandler can rotate the log
instantly. When the storage domain goes down, the stats log will be very noisy,
as reported in the bugzilla, the size grows very rapidly. We can not wait for
logrotate to do the work, so I think RotatingFileHandler is good for this usage.
Line 71: args=('@VDSMLOGDIR@/stats.log', 'a', 104857600, 3)
Line 72: filters=storage.misc.TracebackRepeatFilter
Line 73: level=DEBUG
Line 74: formatter=long
Line 68:
Line 69: [handler_rotatefile]
Line 70: class=logging.handlers.RotatingFileHandler
Line 71: args=('@VDSMLOGDIR@/stats.log', 'a', 104857600, 3)
Line 72: filters=storage.misc.TracebackRepeatFilter
Yes.
Line 73: level=DEBUG
Line 74: formatter=long
Line 75:
Line 76: [formatter_simple]
--
To view, visit http://gerrit.ovirt.org/8884
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I2ee04d8d82e2a14b0a003627981c28e5e64a46ab
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Gal Hammer <[email protected]>
Gerrit-Reviewer: Mark Wu <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: Zhou Zheng Sheng <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches