Re: pmfg / pmapi / null indom
Marko Myllynen <[email protected]>
| Newsgroups | gmane.comp.sysutils.pcp |
|---|---|
| Organization | Red Hat |
| Message-ID | <[email protected]> |
Hi,
On 2016-09-27 21:28, Nathan Scott wrote:
> ----- Original Message -----
>>
>> 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")
$ cat ./test.py
#!/usr/bin/python
from cpmapi import PM_IN_NULL
print(PM_IN_NULL)
$ python ./test.py
4294967295
$ grep PM_IN_NULL /usr/include/pcp/pmapi.h
#define PM_IN_NULL 0xffffffff
$
Cheers,
--
Marko Myllynen
_______________________________________________
pcp mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/pcp