No CPU info from SNMP

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

Moderators: Developers, Moderators

Post Reply
chryzo
Posts: 17
Joined: Mon Feb 18, 2008 8:48 am

No CPU info from SNMP

Post by chryzo »

Hi!
I am running Cacti on an fairly default installation of Ubuntu 7.10 server on an Intel based machine, but got stuck on this problem:
SNMP do not report any CPU info on localhost:

Code: Select all

root@server:/usr/share/cacti# snmpget -v 1 -c public localhost .1.3.6.1.2.1.25.3.3.1.2
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: HOST-RESOURCES-MIB::hrProcessorLoad

root@server:/usr/share/cacti# snmpget -v 2c -c public localhost .1.3.6.1.2.1.25.3.3.1.2
HOST-RESOURCES-MIB::hrProcessorLoad = No Such Instance currently exists at this OID
The graph "ucd/net - CPU Usage" returns value "NaN" (no suprise).
I have tried searching, but cannot find a solution to this problem. What am I doing wrong?
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Hi

how many CPUs are seen by this server ?

You can count them in /proc/cpuinfo
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
chryzo
Posts: 17
Joined: Mon Feb 18, 2008 8:48 am

Post by chryzo »

Code: Select all

root@server:/usr/share/cacti# more /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 13
model name      : Intel(R) Pentium(R) M processor 1.86GHz
stepping        : 8
cpu MHz         : 1862.217
cache size      : 2048 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx u
p est tm2
bogomips        : 3727.49
clflush size    : 64
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Can you retry with this minimalistic snmpd.conf :

Code: Select all

rocommunity public
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
chryzo
Posts: 17
Joined: Mon Feb 18, 2008 8:48 am

Post by chryzo »

Sure:

Code: Select all

root@server:/etc/snmp# nano snmpd.conf
root@server:/etc/snmp# /etc/init.d/snmpd restart
Restarting network management services: snmpd.
root@server:/etc/snmp# # snmpget -v 1 -c public localhost .1.3.6.1.2.1.25.3.3.1.2
root@server:/etc/snmp# snmpget -v 2c -c public localhost .1.3.6.1.2.1.25.3.3.1.2
HOST-RESOURCES-MIB::hrProcessorLoad = No Such Instance currently exists at this OID
Hm. That changed the output for SNMP v1, but did not solve the problem.
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Can you try this :

Code: Select all

$ snmpwalk -v 2c -c public localhost .1.3.6.1.4.1.2021.11
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
chryzo
Posts: 17
Joined: Mon Feb 18, 2008 8:48 am

Post by chryzo »

Code: Select all

root@server:/usr/share/cacti# snmpwalk -v 2c -c public localhost .1.3.6.1.4.11.2021.11
UCD-SNMP-MIB::ssIndex.0 = INTEGER: 1
UCD-SNMP-MIB::ssErrorName.0 = STRING: systemStats
UCD-SNMP-MIB::ssSwapIn.0 = INTEGER: 0
UCD-SNMP-MIB::ssSwapOut.0 = INTEGER: 0
UCD-SNMP-MIB::ssIOSent.0 = INTEGER: 1
UCD-SNMP-MIB::ssIOReceive.0 = INTEGER: 16
UCD-SNMP-MIB::ssSysInterrupts.0 = INTEGER: 75
UCD-SNMP-MIB::ssSysContext.0 = INTEGER: 32
UCD-SNMP-MIB::ssCpuUser.0 = INTEGER: 0
UCD-SNMP-MIB::ssCpuSystem.0 = INTEGER: 0
UCD-SNMP-MIB::ssCpuIdle.0 = INTEGER: 98
UCD-SNMP-MIB::ssCpuRawUser.0 = Counter32: 49146
UCD-SNMP-MIB::ssCpuRawNice.0 = Counter32: 68
UCD-SNMP-MIB::ssCpuRawSystem.0 = Counter32: 54757
UCD-SNMP-MIB::ssCpuRawIdle.0 = Counter32: 6946822
UCD-SNMP-MIB::ssCpuRawWait.0 = Counter32: 7091
UCD-SNMP-MIB::ssCpuRawKernel.0 = Counter32: 53855
UCD-SNMP-MIB::ssCpuRawInterrupt.0 = Counter32: 106
UCD-SNMP-MIB::ssIORawSent.0 = Counter32: 2246160
UCD-SNMP-MIB::ssIORawReceived.0 = Counter32: 146828
UCD-SNMP-MIB::ssRawInterrupts.0 = Counter32: 5322170
UCD-SNMP-MIB::ssRawContexts.0 = Counter32: 2275944
UCD-SNMP-MIB::ssCpuRawSoftIRQ.0 = Counter32: 796
UCD-SNMP-MIB::ssRawSwapIn.0 = Counter32: 0
UCD-SNMP-MIB::ssRawSwapOut.0 = Counter32: 0
Ok. So then I make a generic SNMP OID template graph with this OID?
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Can you retry the "ucd/net - CPU Usage" graph template ?
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
chryzo
Posts: 17
Joined: Mon Feb 18, 2008 8:48 am

Post by chryzo »

Still NaN.
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Can you run the poller once in DEBUG mode, and post the output of the 3 SNMP queries for this graph ?
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
sgm277
Posts: 7
Joined: Thu May 24, 2007 3:08 am

Post by sgm277 »

me too
tenitcac
Posts: 1
Joined: Wed Mar 26, 2008 4:21 am

Post by tenitcac »

I was having the same issues with "ucd/net - CPU Usage", but fixed it by realizing:

- ucd/net - CPU Usage reads from localhost_cpu_*.rrd, not SNMP - Get Processor. Make sure those rrd files exist.

Also, this thread seems to indicate that SNMP - Get Processor is faiing for the snmp-5.3.1 package (http://forums.cacti.net/about23368-0-asc-0.html).

- the .rrd files have to be readable by the apache user/group. If you've changed these from the default www-data:www-data, make sure you're setting the group ownership for the .rrd files and /var/lib/cacti/rra properly .
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests