Red Hat Bugzilla – Bug 1345821
pmlogger records unrequested instance names
Last modified: 2016-10-09 20:28:00 EDT
Description of problem: [root@localhost ~]# rm -f test* [root@localhost ~]# cat conf log mandatory on 1 sec { kernel.all.load [ "1 minute" ] } [root@localhost ~]# pmlogger -s 2 -c ./conf test [root@localhost ~]# pmval -a test kernel.all.load metric: kernel.all.load archive: test host: localhost.localdomain start: Mon Jun 13 12:05:40 2016 end: Mon Jun 13 12:05:41 2016 semantics: instantaneous value units: none samples: 2 interval: 1.00 sec 12:05:40.596 No values available 1 minute 5 minute 15 minute 12:05:41.596 0.0 ? ? [root@localhost ~]# pmdumplog -a test Log Label (Log Format Version 2) Performance metrics from host localhost.localdomain commencing Mon Jun 13 12:05:40.596 2016 ending Mon Jun 13 12:05:41.616 2016 Descriptions for Metrics in the Log ... PMID: 60.2.0 (kernel.all.load) Data Type: float InDom: 60.2 0xf000002 Semantics: instant Units: none PMID: 2.3.2 (pmcd.pmlogger.archive) Data Type: string InDom: 2.1 0x800001 Semantics: discrete Units: none PMID: 2.3.0 (pmcd.pmlogger.port) Data Type: 32-bit unsigned int InDom: 2.1 0x800001 Semantics: discrete Units: none PMID: 2.3.3 (pmcd.pmlogger.host) Data Type: string InDom: 2.1 0x800001 Semantics: discrete Units: none Instance Domains in the Log ... InDom: 60.2 12:05:40.616 3 instances 1 or "1 minute" 5 or "5 minute" 15 or "15 minute" InDom: 2.1 12:05:40.596 1 instances 2907 or "2907" Temporal Index Log Vol end(meta) end(log) 12:05:40.596 0 132 132 12:05:40.616 0 350 244 12:05:41.616 0 485 292 [112 bytes] 12:05:40.596 2.3.3 (pmcd.pmlogger.host): inst [2907 or "2907"] value "localhost" 2.3.0 (pmcd.pmlogger.port): inst [2907 or "2907"] value 4330 2.3.2 (pmcd.pmlogger.archive): inst [2907 or "2907"] value "/root/test" [48 bytes] 12:05:40.616 60.2.0 (kernel.all.load): inst [1 or "1 minute"] value 0 [48 bytes] 12:05:41.616 60.2.0 (kernel.all.load): inst [1 or "1 minute"] value 0 [root@localhost ~]# This is more problem e.g. with proc metrics when there might be hundreds of unrequested instances included (makes harder to use tools like pmrep(1) which do not allow specifying instances and can theoretically be seen also a confidentiality issue, i.e., when trying to record only one specific process information about all running processes is being added to the archive). The same goes for pmlogextract(1). Thanks.
This is not a bug, per se. Or at least the Summary line is misleading. Only values for the '1 minute' instance are in the archive. The instance domain records the fact that there are other instances that were available, but not requested in the pmlogger configuration. Trimming the instance domain in the archive to match only the instances in the archive (not the instances that are available) might be possible, but this changes the semantics and would require a new command line option to request this behaviour (so the default would be to to preserve the existing semantics).
Closing as per Kens comment #c1, and the fact its unlikely anything will be done about this (certainly from Red Hat PCP folk who look after RH/Fedora packages). Note one other option may be pmlogextract for further reducing, after initial logging.
(In reply to Ken McDonell from comment #1) > The instance domain records the fact that there are other instances that > were available, but not requested in the pmlogger configuration. But this fact was not requested by the client/user, and represents only wasted disk space. Luckily, the indom is only dumped once in this case. > Trimming the instance domain in the archive to match only the instances in > the archive (not the instances that are available) might be possible, but > this changes the semantics It would change behaviour, but I've never seen any documentation that would lead people to believe that pmlogger does this, nor that archive files are supposed to represent the complete theoretical indom even when pmResult records only refer to one of them, nor any code with this presumption. If so, I'd call this more of an implementation accident (bug) than a feature worth preserving.
(update the title to be more specific, regarding instance names vs values)