Ключевые слова:cisco, snmp, (найти похожие документы) From : Martin Ansdell-Smith <email@example.com>
Subj : few SNMP MIB variables
MIBs we've met
This page mentions briefly a few SNMP MIB variables and other
indicators that provide useful information about the functioning or
malfunctioning of a network. Of course, in reality, all MIB variables
are useful in some circumstances but, as with all things, we each have
our preferred subsets due to the type of networks we see or the way we
approach maintaining or fixing networks. I mention OIDs I have used
and found helpful as predictors, informers or diagnostics. In
particular I give information on how I have collected information for
some of the more obscure stats I have collected with mrtg and
What I put here I have found to be useful but I might have mis-spelt
something vital or just be wrong. Read the disclaimer and check
things out for yourself.
Even if I got it right it might work on the hardware and software
versions I used but not on yours so check things out for yourself.
Not all MIB variables on all versions of all software and hardware
from all manufacturers contain the correct information. Before you
rely on it check it out for yourself. Check it again when you change
things, or when some else does.
All MIB variable counters (and variables in most programming
languages) have a limited range. They will wrap eventually. They might
wrap in minutes or even seconds. This matters. Check out for yourself
what this means in your network for the variables you are monitoring.
Remember that as loadings change, so does the time to wrap.
All stats collection consumes resources; storing the information uses
more; accessing the information yet more. Statistics collection that
seriously impedes live data flows or badly inaccurate statistics may
be worse than no statistics at all, though you cannot expect
perfection. Check out that you have appropriate resources available to
avoid distorting the real traffic flows or presenting faulty data.
Finally: be prepared to give a reasonable justification for the
statistics you present. Check out for yourself that the information
you collect and present is relevant and accurate enough for the
MIB-II Based Variables of Interest
MIB-II lives at 220.127.116.11.2.1, see the note below if you are not sure
of the significance of this or how to use mrtg or CMU SNMP tools to
look at the information. Most of MIB-II is relevant, most is obvious
in its use so I'll just mention a few less common variables.
Type Code Description
.1.3 sysUpTime should increment
.18.104.22.168 ifInUcastPkts inbound unicast pkts
.22.214.171.124 ifInNUcastPkts inbound nonunicast pkts
.4.12 ipOutNoRoutes !=0 => routing problems
.6.13 tcpConnTable can process, e.g. for current
.11.4 snmpInBadCommunityNames !=0 may be a security issue
.126.96.36.199.13 etherStatsCollisions value irrelevant but big
increase might indicate problem.
Zero on full-duplex links.
.188.8.131.52.12 etherStatsJabbers should be very low
Hewlett Packard (HP)
LaserJet printers (LaserJet 5 (MIO 6) and above but not the
ColorLaserJet 5 Enhanced and maybe others) with a JetDirect card
(EEPROM A.05.05 and up, I think), can provide useful information
including the total number of pages printed, available at
184.108.40.206.220.127.116.11.18.104.22.168.1 (some people have had success with the
proprietary MIB 22.214.171.124.126.96.36.199.3.1 but I have not yet).
The majority of these that I use (dozens, perhaps hundreds) are used
to gather static information such as names assigned to ports, software
versions, cards and modules fitted in chassis (serial number, type,
software, firmware) and I have not detailed those here (though I could
publish the scripts with OIDs if anyone was interested). Some,
however, are useful for real-time data capture. Full details of all
supported MIBs and copies of all the MIBs themselves (as v1, v2, SMI
and OID lists) are available from ftp.cisco.com.
* Router (IOS) CPU Utilization, from the local variables system
group in OLD-CISCO-CPU-MIB.my (or OLD-CISCO-SYS-MIB.my):
+ 188.8.131.52.184.108.40.206.1.56.0 gives avgBusyPer: CPU busy percentage
over the last 5s period in the scheduler
+ 220.127.116.11.18.104.22.168.1.57.0 gives avgBusy1: exponentially-decayed
moving average of CPU busy percentage over a 60s period
+ 22.214.171.124.126.96.36.199.1.58.0 gives avgBusy5: exponentially-decayed
moving average of CPU busy percentage over a 300s period
I find the last two the most useful to give a feel for
utilization. On most routers the two stay together but will
deviate when the load is peaky and the router is very busy, I
find. These are gauges so do not average the readings over the
monitoring period. For example, use the gauge option with mrtg.
* Router (IOS) Free Memory 188.8.131.52.184.108.40.206.1.8.0 from
OLD-CISCO-MEMORY-MIB is the obvious variable but this is not
always, in my limited experience, entirely reliable and is
officially obsolete from IOS 11.1. In the ciscoMemoryPoolTable in
CISCO-MEMORY-POOL-MIB-V1SMI.my there are instances for used, free
and largest contiguous free block of memory for each of the memory
pools found on the router. These values are similar to the ones
seen with sh mem at the router console.
For example, on a 2500 series router there are only two memory
pools, proc (pool 1) and i/o (pool 2). The number and names of the
pools can be seen by an snmpwalk on 220.127.116.11.18.104.22.168.22.214.171.124.2. In
this example, the amount of free memory in each pool can be seen
+ 126.96.36.199.188.8.131.52.184.108.40.206.6.1 (enterprises.220.127.116.11.18.104.22.168)
gives pool 1 (proc) memory free and
+ 22.214.171.124.126.96.36.199.188.8.131.52.6.2 gives pool 2 (i/o) memory free.
+ 184.108.40.206.220.127.116.11.18.104.22.168.7.1 gives proc largest contiguous
+ 22.214.171.124.126.96.36.199.188.8.131.52.7.2 gives i/o largest contiguous
+ 184.108.40.206.220.127.116.11.18.104.22.168.5.1 gives proc memory used
+ 22.214.171.124.126.96.36.199.188.8.131.52.5.2 gives i/o memory used
A comparison of sh mem and the OIDs listed here for two sample
routers can be seen here.
The number of pools depends on the device type. All support
processor memory pools and may have other predefined pools and
also dynamic pools. Some devices allow pools to be called on by
other pools that have run out of memory. The MIB gives the
details. When I last looked it pre-defined five memory pools:
1. processor memory
2. i/o memory
3. pci memory
4. fast memory
5. multibus memory
* Traffic rate on an interface by Protocol. For example,
+ IPX (Novell)
+ Others (e.g. XNS, CLNS, Appletalk): look in the
OLD-CISCO-INTERFACES-MIB for full details
* Configuration file moves. I prefer to do this using Expect but it
can be done using an SNMP set. Permissions need to be set on the
router. The old way used the now deprecated "writeNet" object in
the OLD-CISCO-SYSTEM-MIB by setting writeNet.<tftphost> to the
octetstring value of <tftpfile>. The recommended MIB is
CISCO-CONFIG-COPY-MIB. Full instructions for use are in the MIB.
Catalyst 5x0x switches support the CISCO-STACK-MIB which also
gives tftp facilities for moving configs and software to and from
Specifying and Accessing MIB variables
SNMP (Simple Network Management) Management Information Base (MIB)
variables are referenced by an OID (Object identifier), a sequence of
digits and dots. This specifies the position of the variable in the
MIB tree. Almost all the MIB variables you see commercially will start
with 184.108.40.206 (iso.org.dod.internet) and will then either take the
proprietary limb of the tree (.4.1: private.enterprise) the standard
limb (2.1: mgmt.mib). There are lots of books that explain this well;
My own preference is for Stalling for the explanations and
RMON2/SNMPv3 coverage, Feit for the examples from lots of the standard
After the MIB variable number there has to be an instance defined.
This will usually be 0 (zero) where there can only be one (the Cisco
Router CPU utilization variable above is an example of this),
otherwise it will often be the SNMP index of the interface, for
example. Having mentioned the SNMP index of interfaces do be aware
that these can change if modules are added or taken away from a
chassis, if VLAN configurations change or sub-interfaces are defined,
for example. There may also be non-obvious interfaces such as console
ports. On some equipment the indexes may not be consecutive.
Some software packages try to ease the burden of having to type in
lots of numbers and provide mnemonics for some parts of the tree or
assume that you are starting at somewhere other than the root of the
tree. Read the man and other information that comes with the products.
An example would be getting the current value for avgBusy1 from a
Cisco router. In mrtg the specified OID would be
220.127.116.11.18.104.22.168.1.57.0, with CMU SNMP-Utilities snmpget the OID would
be .22.214.171.124.126.96.36.199.1.57.0 as, without the leading dot it, by default,
assumes the OID is in the standard tree (i.e. without the leading dot
all the CMU SNMP utilities prefix 188.8.131.52.1. to the specified OID).
mrtg now supports the loading of MIBs at run-time, as well as
pre-defined OIDs. This greatly simplifies using unusual OIDs (look at
the documentation on the loadMIBs global configuration file entry).
This page is maintained by Martin Ansdell-Smith (e-mail:
using GNU Emacs and RCS on SuSE Linux 6.4.
Last modified $Date: 2000/06/13 16:36:41 $.