pcp
[Top] [All Lists]

Re: [pcp] pmfg / pmapi / null indom

To: Marko Myllynen <myllynen@xxxxxxxxxx>
Subject: Re: [pcp] pmfg / pmapi / null indom
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Tue, 27 Sep 2016 14:28:18 -0400 (EDT)
Cc: pcp developers <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <a4f3424b-51ba-2f25-80c9-5b81f11efa45@xxxxxxxxxx>
References: <a4f3424b-51ba-2f25-80c9-5b81f11efa45@xxxxxxxxxx>
Reply-to: Nathan Scott <nathans@xxxxxxxxxx>
Thread-index: lOWrBmW/O74MixSzCl98Ncr/Ffg7mw==
Thread-topic: pmfg / pmapi / null indom
Hi Marko,

----- Original Message -----
> Hi,
> 
> Consider the following example:
> 
> #!/usr/bin/python
> 
> from pcp import pmapi
> 
> pmfg = pmapi.fetchgroup()
> sysload = pmfg.extend_indom("kernel.all.sysfork")
> 
> pmfg.fetch()
> for inst, name, value in sysload():
>     print("inst: %d" % inst)
> 
> This prints:
> 
> inst: -1
> 
> Is this some constant or should this be None in the land of Python?
> 

Its cpmapi.PM_IN_NULL (aka "grep PM_IN_NULL /usr/include/pcp/pmapi.h")

cheers.

--
Nathan

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