# snmptable(1) - man - phpMan

[SNMPTABLE(1)](https://www.chedong.com/phpMan.php/man/SNMPTABLE/1/markdown)                                  Net-SNMP                                  [SNMPTABLE(1)](https://www.chedong.com/phpMan.php/man/SNMPTABLE/1/markdown)



## NAME
       snmptable - retrieve an SNMP table and display it in tabular form

## SYNOPSIS
       **snmptable**  [COMMON  OPTIONS] [-Cb] [-CB] [-Ch] [-CH] [-Ci] [-Cf STRING] [-Cw WIDTH] AGENT TA‐
       BLE-OID

## DESCRIPTION
       **snmptable** is an SNMP application that repeatedly uses the SNMP GETNEXT or GETBULK requests to
       query  for information on a network entity.  The parameter TABLE-OID must specify an SNMP ta‐
       ble.

       AGENT identifies a target SNMP agent, which is instrumented to monitor the given objects.  At
       its simplest, the AGENT specification will consist of a hostname or an IPv4 address.  In this
       situation, the command will attempt communication with the agent, using UDP/IPv4 to port  161
       of the given target host. See [_snmpcmd(1)](https://www.chedong.com/phpMan.php/man/snmpcmd/1/markdown)_ for a full list of the possible formats for AGENT.

## OPTIONS
       **COMMON** **OPTIONS**
               Please  see  [_snmpcmd(1)](https://www.chedong.com/phpMan.php/man/snmpcmd/1/markdown)_  for  a list of possible values for COMMON OPTIONS as well as
               their descriptions.

### -Cb
               deleted.

### -CB

### -Cc
               Print table in columns of _CHARS_ characters width.

### -Cf
               The  string  _STRING_  is used to separate table columns.  With this option, each table
               entry will be printed in compact form, just with the string  given  to  separate  the
               columns  (useful  if you want to import it into a database).  Otherwise it is printed
               in nicely aligned columns.

### -Ch

### -CH

### -Ci

### -Cl

### -Cr
               For GETBULK requests, _REPEATERS_ specifies the max-repeaters value to use.   For  GET‐
               NEXT requests, _REPEATERS_ specifies the number of entries to retrieve at a time.

### -Cw
               Specifies  the  width  of  the lines when the table is printed.  If the lines will be
               longer, the table will be printed in sections of at most _WIDTH_ characters.  If  _WIDTH_
               is  less  than the length of the contents of a single column, then that single column
               will still be printed.

       Note that **snmptable** REQUIRES  an argument specifying the agent to query and exactly  one  OID
       argument,  as  described in the [_snmpcmd(1)](https://www.chedong.com/phpMan.php/man/snmpcmd/1/markdown)_ manual page.  This OID **must** be that of a MIB table
       object.

## EXAMPLES
       $ snmptable -v 2c -c public localhost at.atTable

       SNMP table: at.atTable RFC1213-[MIB::atTable](https://www.chedong.com/phpMan.php/perldoc/MIB%3A%3AatTable/markdown)

       atIfIndex   atPhysAddress   atNetAddress
               1  8:0:20:20:0:ab 130.225.243.33

       $ snmptable -v 2c -c public -Cf + localhost at.atTable

       SNMP table: at.atTable

       atIfIndex+atPhysAddress+atNetAddress 1+8:0:20:20:0:ab+130.225.243.33

       $ snmptable localhost -Cl -CB -Ci -OX -Cb -Cc 16 -Cw 64 ifTable

       SNMP table: ifTable

       Index           Descr           Type            Mtu
       Speed           PhysAddress     AdminStatus     OperStatus
       LastChange      InOctets        InUcastPkts     InNUcastPkts
       InDiscards      InErrors        InUnknownProtos OutOctets
       OutUcastPkts    OutNUcastPkts   OutDiscards     OutErrors
       OutQLen         Specific

       index: [1]
       1               lo              softwareLoopbac 16436
       10000000                        up              up
       ?               2837283786      3052466         ?
       0               0               ?               2837283786
       3052466         ?               0               0
       0               zeroDotZero

       index: [2]
       2               eth0            ethernetCsmacd  1500
       10000000        0:5:5d:d1:f7:cf up              up
       ?               2052604234      44252973        ?
       0               0               ?               149778187
       65897282        ?               0               0
       0               zeroDotZero

## BUGS
       The test for _TABLE-OID_ actually specifying a table is rather heuristic.  Note also  that  the
       test requires the defining MIB file to be loaded.

## SEE ALSO
       [snmpcmd(1)](https://www.chedong.com/phpMan.php/man/snmpcmd/1/markdown), [variables(5)](https://www.chedong.com/phpMan.php/man/variables/5/markdown).



V5.9.1                                       25 Jul 2003                                [SNMPTABLE(1)](https://www.chedong.com/phpMan.php/man/SNMPTABLE/1/markdown)
