


Tricklet(1)              USER COMMANDS                Tricklet(1)



NAME
     snmp-get - SNMP-get command

SYNOPSIS
     snmp-get [ <host> <community> <medium>  <timeout>  <retries>
     <port> ]

DESCRIPTION
     _s_n_m_p-_g_e_t sends snmp GET requests to the snmp  agent  on  the
     specified host.  snmp-get reads a line from stdin and inter-
     prets each line as a group of snmp get requests separated by
     semicolons.  Such a group is sent as one SNMP message to the
     host. Seperate lines are sent  as  separate  snmp  messages.
     Output of snmp-get is sent to stdout.
     The format of the input to snmp-get is the same as the  out-
     put generated by snmp-get.


DEFAULTS
     community == "public"
     timeout == 5 secs
     retries == 3
     port == 161


INPUT FORMAT
     An input-line has the following format:

     <mibvar>[=<value>][;<mibvar>[=<value>]]

     or:

     <mibvar> ...

     where <mibvar> is the identifier of the requested mib  vari-
     able  and  <value>  its  future  value.  Since snmp-get only
     requests values, the <value> part has no meaning.

MIB VARIABLES
     A mibvar consists of a logical name defined in  a  MOSY  MIB
     definition  file,  an  optional  index and an optional table
     requestor.
     If a mibvar is followed by three dots (...),  the  value  of
     this  variable and all its alpha-numerically higher brothers
     will be requested as a group. This is useful when retrieving
     tables of values. See EXAMPLES for more information.
     A mibvar can contain an index,  given  as  a  dot  separated
     number  list  encapsulated in square brackets, just like a C
     array index.  This index will be added to the mib number  of
     mibvar.   An  incomplete mib number will be interpreted as a
     request for a  whole  subtree  starting  at  the  given  mib
     number.  Each node in this subtree is returned as a separate



Sun Release 4.1        Last change: local                       1






Tricklet(1)              USER COMMANDS                Tricklet(1)



     output line.


VALUES
     The tricklet library displays and accepts values in a  human
     readable form. Each mib variable has a defined type, and the
     tricklet library converts the human readable  value  to  the
     defined type of the mib variable.
     The following variable types are accepted/displayed  by  the
     tricklet library:

     printable string:        "an example string"
     octet string:            1e:2f:00
     id:                      1.2.3.4.5.6.7.8
     integer:                 123456


EXAMPLES
     The following example retrieves the mib variable  'sysDescr'
     (system   description)   from   the   snmp   agent  on  host
     dnpap.et.tudelft.nl:

     <-- echo "sysDescr" | snmp-get dnpap.et.tudelft.nl
     --> sysDescr[0]="a string"

     The following example  retrieves  variables  'sysDescr'  and
     'sysName' in one snmp request. The result is returned as one
     line.

     <-- echo "sysDescr;sysName" | snmp-get dnpap.et.tudelft.nl
     --> sysDescr[0]="a string";sysName[0]="dnpap"

     The next example shows that the output of one command can be
     used as input for a next command:

     <-- echo "sysDescr" | snmp-get dnpap | snmp-nxt dnpap
     --> sysObjectID[0]=1.3.6.1.4.1.42.2.1.1


FILES
     $(MIBHOME)/mibs          list of MOSY MIB definition files
     $(MIBHOME)/*.def         MOSY MIB definition files
     $(CONFIGROOT)/global.ini  dnpap's configuration variables
     $(BIN)/snmp-get          executable

SEE ALSO
     _s_n_m_p-_n_x_t(_1) _s_n_m_p-_s_e_t(_1) _s_n_m_p-_t_b_l(_1)








Sun Release 4.1        Last change: local                       2



