ucd/net SNMP Cpu usage much bigger than top command

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
funklute
Posts: 1
Joined: Mon Jun 27, 2011 4:28 am

ucd/net SNMP Cpu usage much bigger than top command

Post by funklute »

Hi,
I've recently set up cacti to monitor cpu usage on a CentOS 5.6 server, using the ucd/net SNMP Host template. I am however seeing a discrepancy between the cpu usage in the cacti graph, and the cpu usage I see when using the top command on the server.

For example, the cacti graph reports an average user cpu usage of ~40% (graphs been running for a few days so I can see this is not an unrepresentative spike), while if I do the top command, the line starting with Cpu(s) reports user cpu usage in the range of ~1-6%, and I've never seen it go above 10%.

The server has 16 cores, and I've tried doing top and then typing 1 to see cpu usage per core. With this I see that some cores sometimes spike at ~15%, but most of the time the user cpu usage lies around a few percent for each core.

Is there any obvious reason why the cacti graph should report a much higher cpu usage than the top command? In some other posts I've seen that people have had problems because they didn't understand what the u and m on the graphs meant, but this is definitely not my problem. I'm far from an expert, and I'm sure the information is out there, but part of my problem is I'm not sure exactly what I'm looking for. So while a direct answer would be awesome, a link to some relevant reading would be really helpful too... my best guess so far is that the top command and net-snmp retrieves cpu usage in radically different ways, but I'm not getting any further on that lead.

Thanks :)
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: ucd/net SNMP Cpu usage much bigger than top command

Post by noname »

funklute wrote:For example, the cacti graph reports an average user cpu usage of ~40% (graphs been running for a few days so I can see this is not an unrepresentative spike), while if I do the top command, the line starting with Cpu(s) reports user cpu usage in the range of ~1-6%, and I've never seen it go above 10%.

The server has 16 cores, and I've tried doing top and then typing 1 to see cpu usage per core. With this I see that some cores sometimes spike at ~15%, but most of the time the user cpu usage lies around a few percent for each core.
Just a guessing:
http://www.net-snmp.org/docs/mibs/ucdavis.html#ssCpuRawUser

Code: Select all

Name:         ssCpuRawUser
Type:         COUNTER
Access:       ReadOnly
OID:          .1.3.6.1.4.1.2021.11.50
Description:  On a multi-processor system, the 'ssCpuRaw*'
              counters are cumulative over all CPUs, so their
              sum will typically be N*100 (for N processors).
So maybe it differs from result of top command. (I'm unsure)

See also: How do I Find Out Linux CPU Utilization?

Otherwise, try this template:
- http://forums.cacti.net/viewtopic.php?f=12&t=41324
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest