[pcp] pmRegisterDerived return values
Ken McDonell
kenj at internode.on.net
Mon Jan 18 04:00:37 CST 2016
On 18/01/16 20:28, Marko Myllynen wrote:
> Hi,
>
> In https://bugzilla.redhat.com/show_bug.cgi?id=1286733 two Python PMAPI
> pmRegisterDerived related issues were reported and they were already
> fixed but I think we all kind of forgot the bigger picture.
>
> Consider this example (from the BZ):
>
> try:
> self.context.pmRegisterDerived("foo", "rat(disk.dev.read)")
> except:
> print self.context.pmDerivedErrStr()
>
> Here pmDerivedErrStr returns nothing. Is this expected or should
> pmDerivedErrStr be improved to return always something understandable in
> case of errors?
>
> Thanks,
>
Looks like a Python wrapper issue ... libpcp and friends get it right it
would appear.
kenj at bozo:~/src/pcp/qa$ pminfo -c /tmp/eek foo
[/tmp/eek:1] Error: pmRegisterDerived(foo, ...) syntax error
rat(disk.dev.read)
^
Error: foo: Unknown metric name
kenj at bozo:~/src/pcp/qa$ cat /tmp/eek
foo = rat(disk.dev.read)
More information about the pcp
mailing list