pcp
[Top] [All Lists]

[Bug 1159] New: pmOptions API missing docs, misbehaviour with pmGetNonOp

To: pcp@xxxxxxxxxxx
Subject: [Bug 1159] New: pmOptions API missing docs, misbehaviour with pmGetNonOptionsFromList
From: bugzilla-daemon@xxxxxxxxxxx
Date: Tue, 09 Aug 2016 22:26:47 +0000
Auto-submitted: auto-generated
Delivered-to: pcp@xxxxxxxxxxx
Bug ID 1159
Summary pmOptions API missing docs, misbehaviour with pmGetNonOptionsFromList
Product pcp
Version unspecified
Hardware All
OS Linux
Status NEW
Severity major
Priority P5
Component pcp
Assignee pcp@oss.sgi.com
Reporter fche@redhat.com
CC pcp@oss.sgi.com
Classification Unclassified

A user reports that pcp2graphite cannot be easily invoked from pmmgr's
'manager' facility, because pmmgr runs it thusly:


[Tue Aug  9 22:06:49] pmmgr(29205/29211): /etc/pcp/pmmgr: daemon pid 29212
started: exec pcp2graphite -g graphite1.ord1.swift.racklabs.com -P 2003
elasticsearch xfs -h local: >/var/log/pcp/pmmgr/elastic1-cab1/monitor-0.out
2>/var/log/pcp/pmmgr/elastic1-cab1/monitor-0.err
[Tue Aug  9 22:06:49] pmmgr(29205/29217): /etc/pcp/pmmgr: daemon pid 29212
found dead
^C
rferreira@elastic1-cab1:/etc/pcp/pmmgr$ cat
/var/log/pcp/pmmgr/elastic1-cab1/monitor-0.err
Excluding metric -h (PM_ERR_NAME Unknown metric name)
Excluding metric local: (PM_ERR_NAME Unknown metric name)
Usage: pcp2graphite [options] metricname ...

IOW, pmmgr puts  "-h HOSTSPEC"  at the end of the command line.  pcp2graphite
uses pmGetNonOptionsFromList (src/python/pmapi.c code) to extract the metric
names (intended to be "elasticsearch xfs" in that example), but the "-h FOO"
part is also interpreted as a "non-option".

The pmOptions API documentation lacks coverage of the pmGetNonOptionsFromList
function call (and a number of other pmOptions calls), so it's not obvious
what's supposed to happen.  Other pcp tools like pminfo(1) accept -h stuff at
the end of the command line, after metrics.  IMHO the python stuff should too.


You are receiving this mail because:
  • You are on the CC list for the bug.
  • You are the assignee for the bug.
<Prev in Thread] Current Thread [Next in Thread>