SNMP - Snmpwalk Manpage

From Wiki.IT-Arts.net
Revision as of 10:28, 8 June 2024 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)



snmpwalk --help

USAGE: snmpwalk [OPTIONS] AGENT [OID]

  Version:  5.9.3
  Web:      http://www.net-snmp.org/
  Email:    net-snmp-coders@lists.sourceforge.net

OPTIONS:
  -h, --help		display this help message
  -H			display configuration file directives understood
  -v 1|2c|3		specifies SNMP version to use
  -V, --version		display package version number
SNMP Version 1 or 2c specific
  -c COMMUNITY		set the community string
SNMP Version 3 specific
  -a PROTOCOL		set authentication protocol (MD5|SHA|SHA-224|SHA-256|SHA-384|SHA-512)
  -A PASSPHRASE		set authentication protocol pass phrase
  -e ENGINE-ID		set security engine ID (e.g. 800000020109840301)
  -E ENGINE-ID		set context engine ID (e.g. 800000020109840301)
  -l LEVEL		set security level (noAuthNoPriv|authNoPriv|authPriv)
  -n CONTEXT		set context name (e.g. bridge1)
  -u USER-NAME		set security name (e.g. bert)
  -x PROTOCOL		set privacy protocol (DES|AES|AES-192|AES-256)
  -X PASSPHRASE		set privacy protocol pass phrase
  -Z BOOTS,TIME		set destination engine boots/time
General communication options
  -r RETRIES		set the number of retries
  -t TIMEOUT		set the request timeout (in seconds)
Debugging
  -d			dump input/output packets in hexadecimal
  -D[TOKEN[,...]]	turn on debugging output for the specified TOKENs
			   (ALL gives extremely verbose debugging output)
General options
  -m MIB[:...]		load given list of MIBs (ALL loads everything)
  -M DIR[:...]		look in given list of directories for MIBs
    (default: $HOME/.snmp/mibs:/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf)
  -P MIBOPTS		Toggle various defaults controlling MIB parsing:
			  u:  allow the use of underlines in MIB symbols
			  c:  disallow the use of "--" to terminate comments
			  d:  save the DESCRIPTIONs of the MIB objects
			  e:  disable errors when MIB symbols conflict
			  w:  enable warnings when MIB symbols conflict
			  W:  enable detailed warnings when MIB symbols conflict
			  R:  replace MIB symbols from latest module
  -O OUTOPTS		Toggle various defaults controlling output display:
			  0:  print leading 0 for single-digit hex characters
			  a:  print all strings in ascii format
			  b:  do not break OID indexes down
			  e:  print enums numerically
			  E:  escape quotes in string indices
			  f:  print full OIDs on output
			  n:  print OIDs numerically
			  p PRECISION:  display floating point values with specified PRECISION (printf format string)
			  q:  quick print for easier parsing
			  Q:  quick print with equal-signs
			  s:  print only last symbolic element of OID
			  S:  print MIB module-id plus last element
			  t:  print timeticks unparsed as numeric integers
			  T:  print human-readable text along with hex strings
			  u:  print OIDs using UCD-style prefix suppression
			  U:  don't print units
			  v:  print values only (not OID = value)
			  x:  print all strings in hex format
			  X:  extended index format
  -I INOPTS		Toggle various defaults controlling input parsing:
			  b:  do best/regex matching to find a MIB node
			  h:  don't apply DISPLAY-HINTs
			  r:  do not check values for range/type legality
			  R:  do random access to OID labels
			  u:  top-level OIDs must have '.' prefix (UCD-style)
			  s SUFFIX:  Append all textual OIDs with SUFFIX before parsing
			  S PREFIX:  Prepend all textual OIDs with PREFIX before parsing
  -L LOGOPTS		Toggle various defaults controlling logging:
			  e:           log to standard error
			  o:           log to standard output
			  n:           don't log at all
			  f file:      log to the specified file
			  s facility:  log to syslog (via the specified facility)

			  (variants)
			  [EON] pri:   log to standard error, output or /dev/null for level 'pri' and above
			  [EON] p1-p2: log to standard error, output or /dev/null for levels 'p1' to 'p2'
			  [FS] pri token:    log to file/syslog for level 'pri' and above
			  [FS] p1-p2 token:  log to file/syslog for levels 'p1' to 'p2'
  -C APPOPTS		Set various application specific behaviours:
			  p:  print the number of variables found
			  i:  include given OID in the search range
			  I:  don't include the given OID, even if no results are returned
			  c:  do not check returned OIDs are increasing
			  t:  Display wall-clock time to complete the walk
			  T:  Display wall-clock time to complete each request
			  E {OID}:  End the walk at the specified OID


man snmpwalk

SNMPWALK(1)                                                                                        Net-SNMP                                                                                       SNMPWALK(1)

NAME
       snmpwalk - retrieve a subtree of management values using SNMP GETNEXT requests

SYNOPSIS
       snmpwalk [APPLICATION OPTIONS] [COMMON OPTIONS] AGENT [OID]

DESCRIPTION
       snmpwalk is an SNMP application that uses SNMP GETNEXT requests to query a network entity for a tree of information.

       An  object  identifier (OID) may be given on the command line.  This OID specifies which portion of the object identifier space will be searched using GETNEXT requests.  All variables in the subtree
       below the given OID are queried and their values presented to the user.  Each variable name is given in the format specified in variables(5).

       If no OID argument is present, snmpwalk will search the subtree rooted at SNMPv2-SMI::mib-2 (including any MIB object values from other MIB modules, that are defined as lying within  this  subtree).
       If the network entity has an error processing the request packet, an error packet will be returned and a message will be shown, helping to pinpoint why the request was malformed.

       If the tree search causes attempts to search beyond the end of the MIB, the message "End of MIB" will be displayed.

OPTIONS
       -Cc     Do  not check whether the returned OIDs are increasing.  Some agents (LaserJets are an example) return OIDs out of order, but can complete the walk anyway.  Other agents return OIDs that are
               out of order and can cause snmpwalk to loop indefinitely.  By default, snmpwalk tries to detect this behavior and warns you when it hits an agent acting illegally.  Use -Cc to turn off  this
               check.

       -CE {OID}
               End the walk at the specified OID, rather than a simple subtree.  This can be used to walk a partial subtree, selected columns of a table, or even two or more tables within a single command.

       -Ci     Include  the given OID in the search range.  Normally snmpwalk uses GETNEXT requests starting with the OID you specified and returns all results in the MIB subtree rooted at that OID.  Some‐
               times, you may wish to include the OID specified on the command line in the printed results if it is a valid OID in the tree itself.  This option lets you do this explicitly.

       -CI     In fact, the given OID will be retrieved automatically if the main subtree walk returns no useable values.  This allows a walk of a single instance to behave as generally expected,  and  re‐
               turn the specified instance value.  This option turns off this final GET request, so a walk of a single instance will return nothing.

       -Cp     Upon completion of the walk, print the number of variables found.

       -Ct     Upon  completion  of  the walk, print the total wall-clock time it took to collect the data (in seconds).  Note that the timer is started just before the beginning of the data request series
               and stopped just after it finishes.  Most importantly, this means that it does not include snmp library initialization, shutdown, argument processing, and any other overhead.

       In addition to these options, snmpwalk takes the common options described in the snmpcmd(1) manual page.

EXAMPLES
       Note that snmpwalk REQUIRES  an argument specifying the agent to query and at most one OID argument, as described there.  The command:

       snmpwalk -Os -c public -v 1 zeus system

       will retrieve all of the variables under system:

       sysDescr.0 = STRING: "SunOS zeus.net.cmu.edu 4.1.3_U1 1 sun4m"
       sysObjectID.0 = OID: enterprises.hp.nm.hpsystem.10.1.1
       sysUpTime.0 = Timeticks: (155274552) 17 days, 23:19:05
       sysContact.0 = STRING: ""
       sysName.0 = STRING: "zeus.net.cmu.edu"
       sysLocation.0 = STRING: ""
       sysServices.0 = INTEGER: 72
       (plus the contents of the sysORTable).

       The command:

       snmpwalk -Os -c public -v 1 -CE sysORTable zeus system

       will retrieve the scalar values, but omit the sysORTable.

SEE ALSO
       snmpcmd(1), snmpbulkwalk(1), variables(5).

V5.9.3                                                                                           28 May 2007                                                                                      SNMPWALK(1)