TUT:snmptable

From Net-SNMP Wiki
Revision as of 19:38, 23 January 2007 by Wes (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

snmptable

The snmptable command nicely displays a SNMP table for you in an easy to read column based fashion. Consider the sysORTable, which you saw all the data from in the last section. It's hard to get a good feel about the correlation of data when its displayed in a long list, like the output of snmpwalk gives you. Instead, snmptable nicely formats it for you (though sometimes it can be a bit wide, like in this example):

 % snmptable -v 2c -c demopublic test.net-snmp.org sysORTable
 SNMP table: system.sysORTable
 
sysORIndex                                                                                                                                      sysORID                                                                     sysORDescr  sysORUpTime
         1                                                                                             .iso.org.dod.internet.snmpV2.snmpModules.snmpMIB                                            The Mib module for SNMPv2 entities. 0:0:00:00.00
         2                                         .iso.org.dod.internet.snmpV2.snmpModules.snmpVacmMIB.vacmMIBConformance.vacmMIBGroups.vacmBasicGroup                                      View-based Access Control Model for SNMP. 0:0:00:00.00
         3 .iso.org.dod.internet.snmpV2.snmpModules.snmpFrameworkMIB.snmpFrameworkMIBConformance.snmpFrameworkMIBCompliances.snmpFrameworkMIBCompliance                                          The SNMP Management Architecture MIB. 0:0:00:00.00
         4                            .iso.org.dod.internet.snmpV2.snmpModules.snmpMPDMIB.snmpMPDMIBConformance.snmpMPDMIBCompliances.snmpMPDCompliance                                The MIB for Message Processing and Dispatching. 0:0:00:00.00
         5                                     .iso.org.dod.internet.snmpV2.snmpModules.snmpUsmMIB.usmMIBConformance.usmMIBCompliances.usmMIBCompliance The management information definitions for the SNMP User-based Security Model. 0:0:00:00.00

But you can adjust the width of the table

 % snmptable -v 2c -c demopublic -Cw 80 test.net-snmp.org sysORTable
 SNMP table: system.sysORTable
 
sysORIndex                                                                                                                                      sysORID
         1                                                                                             .iso.org.dod.internet.snmpV2.snmpModules.snmpMIB
         2                                         .iso.org.dod.internet.snmpV2.snmpModules.snmpVacmMIB.vacmMIBConformance.vacmMIBGroups.vacmBasicGroup
         3 .iso.org.dod.internet.snmpV2.snmpModules.snmpFrameworkMIB.snmpFrameworkMIBConformance.snmpFrameworkMIBCompliances.snmpFrameworkMIBCompliance
         4                            .iso.org.dod.internet.snmpV2.snmpModules.snmpMPDMIB.snmpMPDMIBConformance.snmpMPDMIBCompliances.snmpMPDCompliance
         5                                     .iso.org.dod.internet.snmpV2.snmpModules.snmpUsmMIB.usmMIBConformance.usmMIBCompliances.usmMIBCompliance

SNMP table: system.sysORTable, part 2

                                                                    sysORDescr  sysORUpTime
                                           The Mib module for SNMPv2 entities. 0:0:00:00.00
                                     View-based Access Control Model for SNMP. 0:0:00:00.00
                                         The SNMP Management Architecture MIB. 0:0:00:00.00
                               The MIB for Message Processing and Dispatching. 0:0:00:00.00
The management information definitions for the SNMP User-based Security Model. 0:0:00:00.00

Tutorial Sections

About the SNMP Protocol

These tutorial links talk about SNMP generically and how the protocol itself works. They are good introductory reading material and the concepts are important to understand before diving into the later tutorials about Net-SNMP itself.

Net-SNMP Command Line Applications

These tutorial pages discuss the command line tools provided in the Net-SNMP suite of tools. Nearly all the example commands in these tutorials works if you try it yourself, as they're all examples that talk to our online Net-SNMP test agent. Given them a shot!

Application Configuration

All of our applications support configuration to allow you to customize how they behave.

Net-SNMP Daemons

Net-SNMP comes with two long-running daemons: a SNMP agent (snmpd) for responding to management requests and a notification receiver (snmptrapd) for receiving SNMP notifications.

Coding Tutorials

Net-SNMP comes with a highly flexible and extensible API. The API allows you to create your own commands, add extensions to the agent to support your own MIBs and perform specialized processing of notifications.

Debugging SNMP Applications and Agents

All our tools and applications have extensive debugging output. These tutorials talk about how the debugging system works and how you can add your own debugging statements to you code:

Operating System Specific Tutorials