pcp
[Top] [All Lists]

Re: [pcp] pmRegisterDerived return values

To: Marko Myllynen <myllynen@xxxxxxxxxx>, pcp developers <pcp@xxxxxxxxxxx>
Subject: Re: [pcp] pmRegisterDerived return values
From: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Mon, 18 Jan 2016 21:00:37 +1100
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <569CB025.4070603@xxxxxxxxxx>
References: <569CB025.4070603@xxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1
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@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@bozo:~/src/pcp/qa$ cat /tmp/eek
foo = rat(disk.dev.read)

<Prev in Thread] Current Thread [Next in Thread>