I am working on a development project where I am querying the PerfMon Processor object to get statistics.
I am sucessfully querying hundreds of different stats using the python client we have developed however when I query Proccessor (ie CPU NOT process) counters they are always 0....
perfmon_counter: "% CPU Time"
perfmon_counter: IOwait Percentage
perfmon_counter: Idle Percentage
perfmon_counter: Irq Percentage
perfmon_counter: Nice Percentage
perfmon_counter: Softirq Percentage
perfmon_counter: Steal Percentage
perfmon_counter: System Percentage
perfmon_counter: User Percentage
there are the counters i an querying...i am getting results...they are not Null/None, they are just integer 0....always...
the _Total Instance is always 0 as well as the invidividual CPU instances (named 0, 1 etc respectively)
Im testing on a 9.x and 10.x call manager. Im sure they arent always 0, one of the call managers im using to test is quite busy...
when i query individual processors via snmp, we get data but that doesnt give you wait time and id much rather use serviceability/xml api for everything..
Interesting, i am using the open-> add->collect, close mechanism but im not persisting the sessions across polls yet. i was planning on adding that once i verified all the data was good but it looks like I need to do that now. i have the session id caching mechanism im place just need to finish the rest.
I will try that and re post with results.
do you know which object/counters require the session to persist? if that is the case, should I throw out the data for % based stats for the first poll since it will always be 0?
We are trying the same method of opening a session [fetch sessionId]-> adding a counter (with instance name) to the sessionId --> and fetch session.
But we are still getting the value as 0 and Cstatus =2 (which is not ideal)
Attaching the payload and response from Postman.
Can you have a look and let me know what am I missing?
at first glance, your request looks good.
I think the waiting time between "perfmonAddCounter" and "perfmonCollectSessionData" is too low.
I built a waiting time of 15 seconds into my Python Script and it works for CUCM, IMP, CUxN and UCCX.
I've still attached my payload content. I hope it's helpful?!
Hi BjoernMartin ,
Thanks for the reply,
I added the sleep time of 15 seconds in python script...even tried re running fetch session after 15-20 seconds . But Did not seem to work.
However when I compared the response you shared and one I got from our try
The CStatus obtained in the fetch session data =2 (documentation says it should be 0/1) Not sure of the reason for Cstatus =2.
I think I am missing some requirement for the perfMon :
The application user has the Service Monitoring Access Control group and has SOAP services in running state as per document here : https://d1nmyq4gcgsfi5.cloudfront.net/site/sxml/learn/getting-started/perfmon/
Could there be any other role /service we should add which I might be missing?
EDIT : After creating the session, I tried creating
The object you are pulling from has instances, this can be seen by using the following URL:
<Object Name="Processor" HasInstances="true">
<Counter Name="% CPU Time"/>
<Counter Name="IOwait Percentage"/>
<Counter Name="Idle Percentage"/>
<Counter Name="Irq Percentage"/>
<Counter Name="Nice Percentage"/>
<Counter Name="Softirq Percentage"/>
<Counter Name="Steal Percentage"/>
<Counter Name="System Percentage"/>
<Counter Name="User Percentage"/>
With that being said, how are you adding your instanced counters? They should look something like
You can gather the instance names via the perfmonListCounter and perfmonListInstance mechanisms.