For When You Can't Have The Real Thing
[ start | index | login ]
start > snmp > net-snmp


Created by dave. Last edited by dave, 10 years and 107 days ago. Viewed 4,223 times. #4
[diff] [history] [edit] [rdf]

Primarilly Linux information, but mostly Solaris compatable.

Use the output qualifier -Oqn for easy-to-parse output (q means just display the OID and value, no type or = charater; n means show the OID as a number instead of a string (if known)).

SNMPD config

The default on Linux/CentOS is pretty restrictive. If you want to make the interfaces on a system available, add this line to /etc/snmp/snmpd.conf:

view    systemview    included   .

Useful Linux Query Strings

Load values:

  • snmpget -v 1 -c public jupiter UCD-SNMP-MIB::laLoad.1
  • snmpget -v 1 -c public jupiter UCD-SNMP-MIB::laLoad.2
  • snmpget -v 1 -c public jupiter UCD-SNMP-MIB::laLoad.3
Uptime: (Note that net:snmp only counts uptime from the daemon launch, not system boot)
  • snmpget -v 1 -c public ganymede DISMAN-EVENT-MIB::sysUpTimeInstance
Netopia-specific queries:
  • SNMPv2-SMI::enterprises.304. = last 1 second CPU usage
  • SNMPv2-SMI::enterprises.304. = last 1 minute CPU usage
Get the Netopia MIB (below) and you can use slightly more friendly names:
  • NETOPIA-MIB::currentCpuUtil.0
  • NETOPIA-MIB::averageCpuUtil.0

Check out >> for MIB files, and then >> for how to make the tools see them (it is easy).

Useful Netscreen OIDs

This works for ScreenOS 5.3.0r2. However they appear to be 32-bit values that churn too quickly to monitor on a five-minute interval basis which is the default for most monitoring tools.

Packet IN count.$interface
Packet OUT count.$interface
Byte IN count.$interface
Byte OUT count.$interface


Numeric OID output
$ snmpwalk -On -v ...
no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful: | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt