| To: | Nathan Scott <nathans@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [pcp] pmfg / pmapi / null indom |
| From: | Marko Myllynen <myllynen@xxxxxxxxxx> |
| Date: | Tue, 27 Sep 2016 21:36:45 +0300 |
| Cc: | pcp developers <pcp@xxxxxxxxxxx> |
| Delivered-to: | pcp@xxxxxxxxxxx |
| In-reply-to: | <925318399.2722155.1475000898213.JavaMail.zimbra@xxxxxxxxxx> |
| Organization: | Red Hat |
| References: | <a4f3424b-51ba-2f25-80c9-5b81f11efa45@xxxxxxxxxx> <925318399.2722155.1475000898213.JavaMail.zimbra@xxxxxxxxxx> |
| Reply-to: | Marko Myllynen <myllynen@xxxxxxxxxx> |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
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
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [pcp] pmfg / pmapi / null indom, Nathan Scott |
|---|---|
| Next by Date: | Energia Fotovoltaica - Eletricidade Solar, ELETRICIDADE_SOLAR |
| Previous by Thread: | Re: [pcp] pmfg / pmapi / null indom, Nathan Scott |
| Next by Thread: | Re: [pcp] pmfg / pmapi / null indom, Nathan Scott |
| Indexes: | [Date] [Thread] [Top] [All Lists] |