#!/usr/local/bin/python -O """ Retrieve MIB variables associated with user specifed SNMP Object IDs from arbitrary SNMP agent. Since MIB parser is not yet implemented in Python, this script takes and reports Object IDs in dotted numeric representation only. Written by Ilya Etingof , 2000-2002. """ import sys import getopt # Import PySNMP modules from pysnmp import asn1, v1, v2c from pysnmp import role # Initialize help messages options = 'Options:\n' options = options + ' -p port to communicate with at the agent. Default is 161.\n' options = options + ' -r number of retries to be used in requests. Default is 5.\n' options = options + ' -t timeout between retries. Default is 1.\n' options = options + ' -v SNMP version to use [1, 2c]. Default is 1 (version one).' usage = 'Usage: %s [options] ' + str(val)