LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 11-04-2009, 09:57 PM   #1
peter72
Member
 
Registered: Oct 2002
Location: Charlottesville, VA
Distribution: Ubuntu (home), SLES (work)
Posts: 196
Blog Entries: 1

Rep: Reputation: 30
SLES9 snmp calculate CPU usage


I have been struggling with this for a couple of years and think there's a bug in net-snmp on SLES9 SP4 (which I know is now out of support).

servername # rpm -qa | grep snmp
net-snmp-5.1.3.1-0.13

If I look at the Raw CPU for a 2x dual core processor via snmpwalk:

servername # snmpwalk -v 2c -c tsheagan localhost .1.3.6.1.4.1.2021.11.50
UCD-SNMP-MIB::ssCpuRawUser.0 = Counter32: 184552743
servername # snmpwalk -v 2c -c tsheagan localhost .1.3.6.1.4.1.2021.11.51
UCD-SNMP-MIB::ssCpuRawNice.0 = Counter32: 3805228
servername # snmpwalk -v 2c -c tsheagan localhost .1.3.6.1.4.1.2021.11.52
UCD-SNMP-MIB::ssCpuRawSystem.0 = Counter32: 184960730
servername # snmpwalk -v 2c -c tsheagan localhost .1.3.6.1.4.1.2021.11.54
UCD-SNMP-MIB::ssCpuRawWait.0 = Counter32: 293651438

servername # bc -l
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
184552743 / (184552743 + 3805228 + 184960730 + 293651438 + 145570191 )
.22713056347615385441

That gives you 22% cpu usage.

But if you look at mpstat or vmstat:

servername # mpstat 5
Linux 2.6.5-7.283-bigsmp (servername) 11/04/09

21:54:17 CPU %user %nice %system %iowait %irq %soft %idle intr/s
21:54:18 all 0.50 0.00 0.25 0.00 0.00 0.25 99.00 4255.00
21:54:19 all 0.25 0.00 0.25 0.00 0.00 0.00 99.50 3528.71

Anybody have any clues what I'm looking at and doing wrong?

Thanks,
Pete
 
  


Reply

Tags
cpu, raw, snmp


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Monitor CPU / Memory usage via SNMP Mathieu AIX 2 11-04-2009 05:41 PM
How to calculate cpu and memory usage of a process narendra1310 Ubuntu 1 08-30-2008 03:39 AM
CPU usage SNMP vs GKrellM TheMadIndian Linux - Server 0 08-27-2008 12:45 PM
SNMP multiple CPU usage? TBKDan Linux - Software 0 09-27-2007 09:54 AM
Monitoring traffic tool/web based(non-cgi?)/non-SNMP/low CPU usage/non-real time pe2338 Linux - Networking 3 05-04-2006 02:00 PM


All times are GMT -5. The time now is 12:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration