This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1345821 - pmlogger records unrequested instance names
pmlogger records unrequested instance names
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: pcp (Show other bugs)
24
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Nathan Scott
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-06-13 05:10 EDT by Marko Myllynen
Modified: 2016-10-09 20:28 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-09-26 01:50:08 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Marko Myllynen 2016-06-13 05:10:33 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.
Comment 1 Ken McDonell 2016-06-21 05:58:10 EDT
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).
Comment 2 Nathan Scott 2016-09-26 01:50:08 EDT
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.
Comment 3 Frank Ch. Eigler 2016-09-28 09:20:30 EDT
(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.
Comment 4 Nathan Scott 2016-10-09 20:28:00 EDT
(update the title to be more specific, regarding instance names vs values)

Note You need to log in before you can comment on or make changes to this bug.