1SNMPTABLE(1)                       Net-SNMP                       SNMPTABLE(1)
2
3
4

NAME

6       snmptable - retrieve an SNMP table and display it in tabular form
7

SYNOPSIS

9       snmptable  [COMMON  OPTIONS] [-Cb] [-CB] [-Ch] [-CH] [-Ci] [-Cf STRING]
10       [-Cw WIDTH] AGENT TABLE-OID
11

DESCRIPTION

13       snmptable is an SNMP application that repeatedly uses the SNMP  GETNEXT
14       or  GETBULK requests to query for information on a network entity.  The
15       parameter TABLE-OID must specify an SNMP table.
16
17       snmptable is an SNMP application that repeatedly uses the SNMP  GETNEXT
18       or GETBULK requests to query for  information on a network entity.  The
19       parameter TABLE-OID must specify an SNMP table.
20
21       AGENT identifies a target SNMP agent, which is instrumented to  monitor
22       the  gievn objects.  At its simplest, the AGENT specification will con‐
23       sist of a hostname or an IPv4 address.  In this situation, the  command
24       will  attempt  communication with the agent, using UDP/IPv4 to port 161
25       of the given target host. See snmpcmd(1) for a full list of the  possi‐
26       ble formats for AGENT.
27

OPTIONS

29       COMMON OPTIONS
30               Please  see snmpcmd(1) for a list of possible values for COMMON
31               OPTIONS as well as their descriptions.
32
33       -Cb     Display only a brief heading. Any common prefix  of  the  table
34               field names will be deleted.
35
36       -CB     Do not use GETBULK requests to retrieve data, only GETNEXT.
37
38       -Cc CHARS
39               Print table in columns of CHARS characters width.
40
41       -Cf STRING
42               The string STRING is used to separate table columns.  With this
43               option, each table entry will be printed in compact form,  just
44               with  the  string  given to separate the columns (useful if you
45               want to import it into a database).  Otherwise it is printed in
46               nicely aligned columns.
47
48       -Ch     Display only the column headings.
49
50       -CH     Do not display the column headings.
51
52       -Ci     This  option  prepends  the  index  of the entry to all printed
53               lines.
54
55       -Cl     Left justify the data in each column.
56
57       -Cr REPEATERS
58               For GETBULK requests,  REPEATERS  specifies  the  max-repeaters
59               value  to  use.   For GETNEXT requests, REPEATERS specifies the
60               number of entries to retrieve at a time.
61
62       -Cw WIDTH
63               Specifies the width of the lines when the table is printed.  If
64               the lines will be longer, the table will be printed in sections
65               of at most WIDTH characters.  If WIDTH is less than the  length
66               of  the  contents  of  a single column, then that single column
67               will still be printed.
68

EXAMPLES

70       $ snmptable -v 2c -c public localhost at.atTable
71
72       SNMP table: at.atTable RFC1213-MIB::atTable
73
74       atIfIndex   atPhysAddress   atNetAddress
75               1  8:0:20:20:0:ab 130.225.243.33
76
77       $ snmptable -v 2c -c public -Cf + localhost at.atTable
78
79       SNMP table: at.atTable
80
81       atIfIndex+atPhysAddress+atNetAddress 1+8:0:20:20:0:ab+130.225.243.33
82
83       $ snmptable localhost -Cl -CB -Ci -OX -Cb -Cc 16 -Cw 64 ifTable
84
85       SNMP table: ifTable
86
87       Index           Descr           Type            Mtu
88       Speed           PhysAddress     AdminStatus     OperStatus
89       LastChange      InOctets        InUcastPkts     InNUcastPkts
90       InDiscards      InErrors        InUnknownProtos OutOctets
91       OutUcastPkts    OutNUcastPkts   OutDiscards     OutErrors
92       OutQLen         Specific
93
94       index: [1]
95       1               lo              softwareLoopbac 16436
96       10000000                        up              up
97       ?               2837283786      3052466         ?
98       0               0               ?               2837283786
99       3052466         ?               0               0
100       0               zeroDotZero
101
102       index: [2]
103       2               eth0            ethernetCsmacd  1500
104       10000000        0:5:5d:d1:f7:cf up              up
105       ?               2052604234      44252973        ?
106       0               0               ?               149778187
107       65897282        ?               0               0
108       0               zeroDotZero
109

BUGS

111       The test for TABLE-OID actually specifying a table is rather heuristic.
112       Note also that the test requires the defining MIB file to be loaded.
113

SEE ALSO

115       snmpcmd(1), variables(5).
116
117
118
1194th Berkeley Distribution         25 Jul 2003                     SNMPTABLE(1)
Impressum