SNMP Counter Test Agent

Information about the Counter64 Test Agent

A ucd-snmp mib module was developed through funding from SNMPinfo to test:

  1. If managers correctly used 32 and 64-bit counters.
  2. Different approaches to implement 64-bit counters with the SNMPv1 Protocol.

For information on proper usage of SNMP counters, please see SNMPinfo's web page on Counter Behavior

See below about obtaining and using the mib module for this test.

Obtaining and Installing Pre-Compiled Binary Agents

The pre-compiled binary releases containing the counter64 test agent are no longer available.

Compiling the Source Code Directly

  1. Obtain the net-snmp software package via the project download page.
  2. Unzip and untar the package:

    It should create a new directory, E.G. net-snmp-5.0.x. We will refer to this below as SRCDIR.

  3. Get the sitCtr.h and sitCtr.c source files that make up the mib module for the special test. Place these files in the SRCDIR/agent/mibgroup directory.
  4. Configure the net-snmp package to remove the normal mib modules it compiles with, and to utilize this new mib module, the mibII/system_mib mib module and the mibII/vacm_vars mib module (the last of which is required). This also leaves in the snmpv3 mibs. To do this, change directories to the SRCDIR directory and type:

    (Run "./configure --help", and/or read the SRCDIR/INSTALL file to see more information on using the configure script.)

    (This still will take a while.)

  5. Type "make" to compile the package.

    Note: in addition to the agent, an snmp library and some applications will be compiled as well. You will probably want to use these utilities to talk with the agent you are building, as they will be configured by default to look for and use the SIT-CTR mib module.

  6. Type "make install" if you want to install the ucd-snmp package (by default, it installs into /usr/local).
  7. Download the sit-ctr.mib file.
  8. Place the above mib file in the /usr/local/share/snmp/mibs directory if you want numerical to OID translations to work with the applications.

Using the Counter64 Test Agent

  1. Start the snmp agent (as root):

    Note: by default, the agent runs in the background and to can appear to quit even though it has actually remained running.

  2. You can then use snmp tools such as snmpwalk, and snmpget to examine the contents of the agent's sitCtr mib module:
    snmpwalk -v 2c -R -s localhost public sitCtrTest1Objs
    David> sitCtrDiscont.0 = Timeticks: (10981) 0:01:49.81
    David> sitCtrInitHigh.0 = Gauge: 0
    David> sitCtrInitLow.0 = Gauge: 0
    David> sitCtrPeriodLen.0 = Gauge: 10 seconds
    David> sitCtrPeriods.0 = 11
    David> sitCtrIncr.0 = Gauge: 1073741825
    David> sitCtrSplit1High.0 = 2
    David> sitCtrSplit1Low.0 = 3221225483
    David> sitCtrT1c64.0 = Counter64: 11811160075
    David> sitCtrSplit2High.0 = 0
    David> sitCtrSplit2Low.0 = 4094
    David> sitCtrT2c64.0 = Counter64: 4094
    David> sitCtrT1A.0 = 11811160075
    David> sitCtrT1O.0 = Opaque: Counter64: 11811160075
    David> sitCtrT2A.0 = 4094
    David> sitCtrT2O.0 = Opaque: Counter64: 4094
                

Some sections of the agent's counter64 test mib are writable, but by default the agent is not configured to allow write access. You will have to see the snmpd.conf manual page for instructions on configuring the agent to allow you to perform snmpset's on the writable variables.

Further Reference


Last modified: Wed Dec 11 06:30:44 PST 2002