cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1437
Views
0
Helpful
7
Replies
Highlighted
Beginner

Perfmon CPU

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..

any ideas?

doug

7 REPLIES 7
Highlighted
Cisco Employee

Make sure you are using the 'session' mechanism (open -> add counter -> collect), as the service requires multiple data points to calculate some stats (like percentages.)

Highlighted

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?

Highlighted

I'm not aware of a deterministic way to find out ahead of time, though I can't think of any off the top besides percentages.

Ignoring the first poll would right.

Highlighted

Using the session key fixed this by the way although the cms we monitor were also upgraded at some point but im using the sessions instead of creating and closing on every poll and the data looks good.  Thanks!

Highlighted

Hi,

I have the problem too with PerfMon Processor object.
How do I solve the problem? API logging looks good.

Highlighted

Do you know how does it calculate CPU Utilization in session mechanism ?

Thanks,
Prama

Highlighted
Beginner

The object you are pulling from has instances, this can be seen by using the following URL:

https://X.X.X.X/ast/AstIsapi.dll?PerfmonListObject

<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"/>

</Object>

With that being said, how are you adding your instanced counters? They should look something like

\\x.x.x.x\object(instancename)\countername

You can gather the instance names via the perfmonListCounter and perfmonListInstance mechanisms.

This widget could not be displayed.