SNMP - Get Processor Information

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

Moderators: Developers, Moderators

Post Reply
Brujo

SNMP - Get Processor Information

Post by Brujo »

hi together,

i get no results at Associated Data Queries for the SNMP - Get Processor Information - Success [0 Items, 0 Rows]


the Verbose Query output looks like
Data Query Debug Information

+ Running data query [9].
+ Found type = '4 '[script query].
+ Found data query XML file at '/home/htdocs/cacti/resource/script_queries/host_cpu.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php -q /home/htdocs/cacti/scripts/query_host_cpu.php 82.165.34.54 public 1 index'
+ Executing script query '/usr/bin/php -q /home/htdocs/web0/html/system/cacti/scripts/query_host_cpu.php 82.165.34.54 public 1 query index'
any hint ?
Brujo
Posts: 3
Joined: Mon Jul 26, 2004 5:09 am

Post by Brujo »

sorry forgot the need infos:

Suse 9.0, ucp-snmp, cacti 0.8.5, snmpwalk runs without an error
melchandra
Cacti User
Posts: 311
Joined: Tue Jun 29, 2004 12:52 pm
Location: Indiana

Post by melchandra »

Can you walk .1.3.6.1.2.1.25.3.3 with snmpwalk? This is the processor table that the script looks at.
Dave
gjandrews35
Posts: 17
Joined: Tue Sep 23, 2003 5:10 pm
Location: USA

Re: SNMP - Get Processor Information

Post by gjandrews35 »

Brujo wrote:hi together,

i get no results at Associated Data Queries for the SNMP - Get Processor Information - Success [0 Items, 0 Rows]


the Verbose Query output looks like
Data Query Debug Information

+ Running data query [9].
+ Found type = '4 '[script query].
+ Found data query XML file at '/home/htdocs/cacti/resource/script_queries/host_cpu.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php -q /home/htdocs/cacti/scripts/query_host_cpu.php 82.165.34.54 public 1 index'
+ Executing script query '/usr/bin/php -q /home/htdocs/web0/html/system/cacti/scripts/query_host_cpu.php 82.165.34.54 public 1 query index'
any hint ?
Did you try running the script(s) on the command line ?
Brujo
Posts: 3
Joined: Mon Jul 26, 2004 5:09 am

Post by Brujo »

melchandra wrote:Can you walk .1.3.6.1.2.1.25.3.3 with snmpwalk? This is the processor table that the script looks at.
the output is:
brujo:~ # snmpwalk localhost public .1.3.6.1.2.1.25.3.3
host.hrDevice.hrProcessorTable.hrProcessorEntry.hrProcessorFrwID.769 = OID: .ccitt.zeroDotZero
brujo:~ #
Brujo
Posts: 3
Joined: Mon Jul 26, 2004 5:09 am

Re: SNMP - Get Processor Information

Post by Brujo »

gjandrews35 wrote:Did you try running the script(s) on the command line ?
i get only:
brujo:~ # php /home/htdocs/web0/html/system/cacti/scripts/query_host_cpu.php localhost public 1 index
Content-type: text/html; charset=iso-8859-1
X-Powered-By: PHP/4.3.3
gjandrews35
Posts: 17
Joined: Tue Sep 23, 2003 5:10 pm
Location: USA

Post by gjandrews35 »

Brujo wrote:
melchandra wrote:Can you walk .1.3.6.1.2.1.25.3.3 with snmpwalk? This is the processor table that the script looks at.
the output is:
brujo:~ # snmpwalk localhost public .1.3.6.1.2.1.25.3.3
host.hrDevice.hrProcessorTable.hrProcessorEntry.hrProcessorFrwID.769 = OID: .ccitt.zeroDotZero
brujo:~ #
When I try a
snmpwalk -v1 -cpublic localhost .1.3.6.1.2.1.25.3.3
on a single cpu host I only get back
HOST-RESOURCES-MIB::hrProcessorFrwID.1 = OID: SNMPv2-SMI::zeroDotZero

but on a multi processor machine I get..
HOST-RESOURCES-MIB::hrProcessorFrwID.1 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrProcessorFrwID.2 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrProcessorFrwID.3 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrProcessorFrwID.4 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrProcessorLoad.1 = INTEGER: 6
HOST-RESOURCES-MIB::hrProcessorLoad.2 = INTEGER: 5
HOST-RESOURCES-MIB::hrProcessorLoad.3 = INTEGER: 2
HOST-RESOURCES-MIB::hrProcessorLoad.4 = INTEGER: 4

Seems that processorload only works on multi cpus ?
melchandra
Cacti User
Posts: 311
Joined: Tue Jun 29, 2004 12:52 pm
Location: Indiana

Post by melchandra »

no - I've tried it on single-cpu machines. You should see both the FrwID, and the Load. This is why Cacti is not working properly... somthing in your snmp is not configured properly or something. It should be reporting the cpu load through that oid. If you can find another place where the cpu load is measured (a manufacturere specific oid perhaps) then you can use the generic oid templates, or write your own script to make a cpu load graph.
Dave
oxman

Post by oxman »

I have the same problem, but with a right snmpwalk.

I use the last cacti : cacti-0.8.6b-1.

Data Query Debug Information
+ Running data query [9].
+ Found type = '6 '[script query].
+ Found data query XML file at '/var/www/html/cacti/resource/script_server/host_cpu.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php -q /var/www/html/cacti/scripts/ss_host_cpu.php 192.168.1.84 public 2 index'
+ Executing script query '/usr/bin/php -q /var/www/html/cacti/scripts/ss_host_cpu.php 192.168.1.84 public 2 query index'
+ Found data query XML file at '/var/www/html/cacti/resource/script_server/host_cpu.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/script_server/host_cpu.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/script_server/host_cpu.xml'

It's ok.

snmpwalk :
# snmpwalk 192.168.1.84 .1.3.6.1.2.1.25.3.3
hrProcessorFrwID.7 zeroDotZero
hrProcessorLoad.7 15

And manually :
# php /var/www/html/cacti/scripts/ss_host_cpu.php 192.168.1.84 public 2 index
#

Nothing :(

I dunno why i have "2 index", but if i do :
# php /var/www/html/cacti/scripts/ss_host_cpu.php 192.168.1.84 public 1 index
0
#

I have 0 in result.

Note that :
# php /var/www/html/cacti/scripts/ss_host_cpu.php 192.168.1.84 public 2 query index
# php /var/www/html/cacti/scripts/ss_host_cpu.php 192.168.1.84 public 1 query index
0!0
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Suse 9.0, ucp-snmp, cacti 0.8.5, snmpwalk runs without an error
If you check out the host template "ucd/net SNMP Host" it will give you a lot more information when using UCP/NET SNMP on linux.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
User avatar
SCaRaBaeuS
Posts: 22
Joined: Tue Mar 30, 2004 9:42 am

Post by SCaRaBaeuS »

what did you add into the conf file of snmp to make it work?
".1.3.6.1.2.1.25.3.3"
i can't find anything about it.. so i hoped anybody could help me with this :)
lannocc
Posts: 1
Joined: Wed Feb 16, 2005 6:19 pm

Post by lannocc »

I too am having this problem: "SNMP - Get Processor Information" always returns 0 rows. I have tried this on two separate boxes without success. In both cases, my results are like the following:

Code: Select all

$ snmpwalk -v1 -cpublic localhost | grep Processor
HOST-RESOURCES-MIB::hrDeviceType.768 = OID: HOST-RESOURCES-TYPES::hrDeviceProcessor
HOST-RESOURCES-MIB::hrProcessorFrwID.768 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrSWRunParameters.28242 = STRING: "Processor
This of course leads me to believe it is an SNMP configuration issue since SNMP isn't reporting any processor load information. What configuration options should I be checking for?

My /etc/snmp/snmpd.conf is very simple:

Code: Select all

rocommunity  public
syslocation  "... my location ..."
syscontact  "... my contact info ..."
EppO
Posts: 2
Joined: Tue Mar 22, 2005 6:47 pm

Post by EppO »

I read this from net-snmp sourceforge bug tracking page:
2002-11-08
Note that although the Host Resources table includes a
hrProcessorTable,.... it doesn't calculate the
hrProcessorLoad value correctly, and either returns
a dummy value (based on the load average) or nothing
at all.

Providing a realistic (and accurate) value for this object
would require constant polling within the agent, and it has
been felt that doing so would put an unacceptable load on
the agent, for an insufficient benefit.
So, no hrProcessorLoad entity is available on net-snmp. (but the date of this post is very old, I don't know the situation actually but I guess it's the same)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest