Operating System - HP-UX
1820530 Members
2172 Online
109626 Solutions
New Discussion юеВ

Re: Querying CPU Utilization via SNMP

 
Brian Frost
Occasional Advisor

Querying CPU Utilization via SNMP

I'm trying to query CPU utilization data via snmp on a hpux system and the snmp agent always seems to return the same values whether the system is busy or not.

Is there something that has to be done on the system in order for it to properly report cpu utilization?

Here's an example of what I am seeing:

computerSystemUserCPU.0 907682
computerSystemSysCPU.0 1237782
computerSystemIdleCPU.0 22850595
computerSystemNiceCPU.0 131

I am not seeing these values change if a run the query again.
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: Querying CPU Utilization via SNMP

There are background processes that do housekeeping write data to disk, that do any number of things all the time.

There is no such thing as a totally idle system. Run top for a while and you'll see.

You might want to run some commands to measure peformance on the machine to see if your results are consistent.

Attaching a set of scripts.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Brian Frost
Occasional Advisor

Re: Querying CPU Utilization via SNMP

As I said before, the values are not changing period. They are always the same whether the system is busy or not.
Con O'Kelly
Honored Contributor

Re: Querying CPU Utilization via SNMP

Hi

I don't believe there is any additional configuration needed to retrieve this data.
On my system I can run:
# snmpwalk computerSystemIdleCPU

The counter will keep incrementing each time I run it as follows:
1st time -> Counter: 346599384
2nd time -> Counter: 346608566

Not exactly sure but this may only be implemented if you are using Extensible SNMP Agent. Just an idea to explain why your counters remain the same.

Cheers
Con