SNMP Simulator Project Logo
SNMP Simulator introduction
Producing SNMP snapshots
Simulating SNMP Agents
Transport-based variation
Sharing snapshots
MIB-based simiulation
Simulation based on captured traffic
Simulation with variation modules
Recording with variation modules
Managing data files
Large scale simulation
Tips and tricks
Download & Install
Github repo
Adding features
Simulation Service
Get SNMP Simulator at Fast, secure and Free Open Source software downloads

Producing SNMP snapshots

Primary method of recording an SNMP snapshot is to run snmprec tool against your donor device. This tool will execute a series of SNMP GETNEXT queries for a specified range of OIDs over a chosen SNMP protocol version and store response data in a text file.

Data file format is optimized to be compact, human-readable and inexpensive to parse. It's also important to store full and exact response information in a most intact form. Here's an example data file content:|4|Linux SMP Tue Jun 19 14:58:11 CDT 2007 i686|6||67|233425120|4x|00127962f940|64x|c3dafe61

There is a pipe-separated triplet of OID-tag-value items where:

  • OID is a dot-separated set of numbers.
  • Tag is a BER-encoded ASN.1 tag. When value is hexified, an 'x' literal is appended. Reference to a variation module can also be embedded into tag.
  • Value is either a printable string, a number or a hexifed value.

Valid tag values and their corresponding ASN.1/SNMP types are:

  • Integer32 - 2
  • NULL - 5
  • IpAddress - 64
  • Counter32 - 65
  • Gauge32 - 66
  • TimeTicks - 67
  • Opaque - 68
  • Counter64 - 70

Data file recording would look like this:

$  -h
  SNMP Agents Recording tool. Queries specified Agent, stores response
  data in data files for subsequent playback by SNMP Simulation tool.
  Can store a series of recordings for a more dynamic playback.
Usage: scripts/ [--help]
    [--start-oid=<OID>] [--stop-oid=<OID>]

$ --agent-udpv4-endpoint= --start-oid= 
--stop-oid= --output-file=snmpsim/data/recorded/linksys-
Scanning "/usr/local/share/snmpsim/variation" directory for variation 
modules...  none requested
SNMP version 2c
Community name: public
Querying UDP/IPv4 agent at
Sending initial GETNEXT request....
OIDs dumped: 304, elapsed: 1.94 sec, rate: 157.00 OIDs/sec
$ ls -l data/recorded/linksys-system.snmprec
-rw-r--r-- 1 ilya users 16252 Oct 26 14:49 data/recorded/linksys-system.snmprec
$ head data/recorded/linksys-system.snmprec|4|BEFSX41|6||67|638239|4|Linksys|4|isp-gw|4|4, Petersburger strasse, Berlin, Germany|67|4

There are no special requirements for device file name and location. Note, that Simulator treats device file path as an SNMPv1/v2c community string and its MD5 hash constitutes SNMPv3 context name.

If you don't readily have SNMP Agent to play with, you're welcome to use online SNMP Simulator:

$ --community=public
SNMP version 2c, Community name: public
Querying UDP/IPv4 agent at
Sending initial GETNEXT request....|4|SunOS 4.1.3_U1 1 sun4m|6||67|137765775|4|SNMP Laboratories,|4||4|Moscow, Russia
OIDs dumped: 86, elapsed: 2.00 sec, rate: 42.00 OIDs/sec

About three times faster snapshot recording may be achieved by using SNMP's GETBULK operation:

$ --use-getbulk 

Faster recording may be important for capturing changes to Managed Objects at better resolution.

You could always modify your data files with a text editor.

If you wish to contribute such a snapshot - please, run snmprec for your device and send me its output file. Make sure that your device does not have any private information.

Need help? Try snmpsim mailing lists or contact us.