Discussion:
cpu usage through UCD-SNMP-MIB::systemStats
toc2 techie
2007-02-21 06:15:58 UTC
Permalink
Hi,

I am not able to get cpu usage data while doing a snmpwalk using
UCD-SNMP-MIB on my test-server

bash-3.00$ /usr/sfw/bin/snmpwalk -c public -v 1 test-server>
UCD-SNMP-MIB::systemStats
bash-3.00$ /usr/sfw/bin/snmpwalk -c public -v 1 test-server
.1.3.6.1.4.1.2021.12


# /bin/snmpd --version

NET-SNMP version: 5.3.0.1
Web: http://www.net-snmp.org/
Email: net-snmp-***@lists.sourceforge.net


I am able to get memory statistics , does anyone know why its not working
for systemsStats.
Thomas Anders
2007-02-21 10:56:08 UTC
Permalink
Post by toc2 techie
I am not able to get cpu usage data while doing a snmpwalk using
UCD-SNMP-MIB on my test-server
bash-3.00$ /usr/sfw/bin/snmpwalk -c public -v 1 test-server>
UCD-SNMP-MIB::systemStats
bash-3.00$ /usr/sfw/bin/snmpwalk -c public -v 1 test-server
.1.3.6.1.4.1.2021.12
What's the exact output of these commands?
What's your platform and OS version?
What's the output of "net-snmp-config --configure-options"?


+Thomas
--
Thomas Anders (thomas.anders at blue-cable.de)
toc2 techie
2007-02-22 07:00:38 UTC
Permalink
Thanks for the reply Thomas, below is the data you requested.
Post by Thomas Anders
Post by Thomas Anders
What's the exact output of these commands?
There is no output
Post by Thomas Anders
Post by Thomas Anders
What's your platform and OS version?
Its mips platform, 2.4 Linux Kernel
Post by Thomas Anders
Post by Thomas Anders
What's the output of "net-snmp-config --configure-options"?
I didn't find any such command or file on my box
Post by Thomas Anders
Post by Thomas Anders
I am not able to get cpu usage data while doing a snmpwalk using
UCD-SNMP-MIB on my test-server
bash-3.00$ /usr/sfw/bin/snmpwalk -c public -v 1 test-server>
UCD-SNMP-MIB::systemStats
bash-3.00$ /usr/sfw/bin/snmpwalk -c public -v 1 test-server
.1.3.6.1.4.1.2021.12
What's the exact output of these commands?
What's your platform and OS version?
What's the output of "net-snmp-config --configure-options"?
+Thomas
--
Thomas Anders (thomas.anders at blue-cable.de)
Thomas Anders
2007-02-22 09:36:58 UTC
Permalink
Post by toc2 techie
Post by Thomas Anders
What's the exact output of these commands?
There is no output
That's somewhat strange. Can you please add "-d" to the (beginning of
the) command-line options and post the *full* output you get?
Post by toc2 techie
Post by Thomas Anders
What's the output of "net-snmp-config --configure-options"?
I didn't find any such command or file on my box
Asking differently, then: Is this a manual installation or a package? Is
the source an unmodified net-snmp 5.3.0.1 as shipped by us? How
*exactly* (with what configure options) has it been built?

Also, what's the full content of your snmpd.conf and how exactly do you
start your snmpd?


+Thomas
--
Thomas Anders (thomas.anders at blue-cable.de)
toc2 techie
2007-02-28 06:30:39 UTC
Permalink
HI,
below is what you asked for.
Post by Thomas Anders
Post by toc2 techie
Post by Thomas Anders
Post by Thomas Anders
What's the exact output of these commands?
There is no output
That's somewhat strange. Can you please add "-d" to the (beginning of
the) command-line options and post the *full* output you get?
bash$ snmpwalk -d -v1 -c public <ip> UCD-SNMP-MIB::systemStats

Sending 43 bytes to <ip>
0000: 30 29 02 01 00 04 06 70 75 62 6C 69 63 A1 1C 02 0).....public...
0016: 04 6D 95 B8 81 02 01 00 02 01 00 30 0E 30 0C 06 .m.........0.0..
0032: 08 2B 06 01 04 01 8F 65 0B 05 00 .+.....e...


Received 46 bytes from <ip>
0000: 30 2C 02 01 00 04 06 70 75 62 6C 69 63 A2 1F 02 0,.....public...
0016: 04 6D 95 B8 81 02 01 00 02 01 00 30 11 30 0F 06 .m.........0.0..
0032: 0A 2B 06 01 04 01 8F 65 64 01 00 02 01 01 .+.....ed.....


Sending 43 bytes to <ip>
0000: 30 29 02 01 00 04 06 70 75 62 6C 69 63 A0 1C 02 0).....public...
0016: 04 6D 95 B8 82 02 01 00 02 01 00 30 0E 30 0C 06 .m.........0.0..
0032: 08 2B 06 01 04 01 8F 65 0B 05 00 .+.....e...


Received 43 bytes from <ip>
0000: 30 29 02 01 00 04 06 70 75 62 6C 69 63 A2 1C 02 0).....public...
0016: 04 6D 95 B8 82 02 01 02 02 01 01 30 0E 30 0C 06 .m.........0.0..
0032: 08 2B 06 01 04 01 8F 65 0B 05 00 .+.....e...
Post by Thomas Anders
Post by toc2 techie
Post by Thomas Anders
What's the output of "net-snmp-config --configure-options"?
I didn't find any such command or file on my box
Asking differently, then: Is this a manual installation or a package? Is
the source an unmodified net-snmp 5.3.0.1 as shipped by us? How
*exactly* (with what configure options) has it been built?
will find out about this. Its not rpm based one.

Also, what's the full content of your snmpd.conf and how exactly do you
Post by Thomas Anders
start your snmpd?
snmpd is starte as snmpd -c /etc/snmpd.conf.

contents of snmpd.conf

###############################################################################
# Access Control
###############################################################################
#
# Enable read-only access for the "public" community.

rocommunity public


###############################################################################
# System contact information
###############################################################################
#
# Set the sysLocation and sysContact system variables.

syslocation B3
syscontact System administrator


###############################################################################
# Enable AgentX functionality for the OpenHPI Subagent
###############################################################################

master agentx
agentXTimeout 5


+Thomas
Post by Thomas Anders
--
Thomas Anders (thomas.anders at blue-cable.de)
Dave Shield
2007-02-28 15:09:34 UTC
Permalink
Post by toc2 techie
bash$ snmpwalk -d -v1 -c public <ip> UCD-SNMP-MIB::systemStats
Sending 43 bytes to <ip>
0000: 30 29 02 01 00 04 06 70 75 62 6C 69 63 A1 1C 02
0016: 04 6D 95 B8 81 02 01 00 02 01 00 30 0E 30 0C 06
0032: 08 2B 06 01 04 01 8F 65 0B 05 00
That's a GETNEXT request for
.1.3.6.1.4.1.2021.11 (i.e. systemStats)
Post by toc2 techie
Received 46 bytes from <ip>
0000: 30 2C 02 01 00 04 06 70 75 62 6C 69 63 A2 1F 02
0016: 04 6D 95 B8 81 02 01 00 02 01 00 30 11 30 0F 06
0032: 0A 2B 06 01 04 01 8F 65 64 01 00 02 01 01
That's RESPONSE for
.1.3.6.1.4.1.2021.100.1.0 (i.e. versionIndex.0)

This lies outside the requested subtree, so
snmpwalk discards it.
Post by toc2 techie
Sending 43 bytes to <ip>
0000: 30 29 02 01 00 04 06 70 75 62 6C 69 63 A0 1C 02
0016: 04 6D 95 B8 82 02 01 00 02 01 00 30 0E 30 0C 06
0032: 08 2B 06 01 04 01 8F 65 0B 05 00
That's a GET request for systemStats
Post by toc2 techie
Received 43 bytes from <ip>
0000: 30 29 02 01 00 04 06 70 75 62 6C 69 63 A2 1C 02
0016: 04 6D 95 B8 82 02 01 02 02 01 01 30 0E 30 0C 06
0032: 08 2B 06 01 04 01 8F 65 0B 05 00
and the response that says "no"

Basically, the agent doesn't seem to implement the
systemStats tree - or else the access configuration
doesn't allow you to query it.

Dave

Loading...