1SNMPTABLE(1) Net-SNMP SNMPTABLE(1)
2
3
4
6 snmptable - retrieve an SNMP table and display it in tabular form
7
9 snmptable [COMMON OPTIONS] [-Cb] [-CB] [-Ch] [-CH] [-Ci] [-Cf STRING]
10 [-Cw WIDTH] AGENT TABLE-OID
11
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
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
69 Note that snmptable REQUIRES an argument specifying the agent to query
70 and exactly one OID argument, as described in the snmpcmd(1) manual
71 page. This OID must be that of a MIB table object.
72
74 $ snmptable -v 2c -c public localhost at.atTable
75
76 SNMP table: at.atTable RFC1213-MIB::atTable
77
78 atIfIndex atPhysAddress atNetAddress
79 1 8:0:20:20:0:ab 130.225.243.33
80
81 $ snmptable -v 2c -c public -Cf + localhost at.atTable
82
83 SNMP table: at.atTable
84
85 atIfIndex+atPhysAddress+atNetAddress 1+8:0:20:20:0:ab+130.225.243.33
86
87 $ snmptable localhost -Cl -CB -Ci -OX -Cb -Cc 16 -Cw 64 ifTable
88
89 SNMP table: ifTable
90
91 Index Descr Type Mtu
92 Speed PhysAddress AdminStatus OperStatus
93 LastChange InOctets InUcastPkts InNUcastPkts
94 InDiscards InErrors InUnknownProtos OutOctets
95 OutUcastPkts OutNUcastPkts OutDiscards OutErrors
96 OutQLen Specific
97
98 index: [1]
99 1 lo softwareLoopbac 16436
100 10000000 up up
101 ? 2837283786 3052466 ?
102 0 0 ? 2837283786
103 3052466 ? 0 0
104 0 zeroDotZero
105
106 index: [2]
107 2 eth0 ethernetCsmacd 1500
108 10000000 0:5:5d:d1:f7:cf up up
109 ? 2052604234 44252973 ?
110 0 0 ? 149778187
111 65897282 ? 0 0
112 0 zeroDotZero
113
115 The test for TABLE-OID actually specifying a table is rather heuristic.
116 Note also that the test requires the defining MIB file to be loaded.
117
119 snmpcmd(1), variables(5).
120
121
122
123V5.7.2 25 Jul 2003 SNMPTABLE(1)