snmptable 명령은 SNMP 테이블의 컨텐츠를 검색하여 테이블 형식, 즉 결과 출력이 검색하는 테이블과 비슷하게 한 번에 하나의 테이블 행으로 컨텐츠를 표시합니다. 이는 테이블의 컨텐츠를 한 번에 하나의 열에 표시하는 snmpwalk 명령과 대조적입니다.
다음은 snmptable 명령의 예입니다.
% snmptable SNMP_agent sysORTable SNMP table: SNMPv2-MIB::sysORTable sysORID sysORDescr sysORUpTime IF-MIB::ifMIB The MIB module to 0:0:00:00.01 describe generic objects SNMPv2-MIB::snmpMIB The MIB module for SNMPv2 0:0:00:00.02 for network interface entities. TCP-MIB::tcpMIB The MIB module for 0:0:00:00.02 sub-layers. managing TCP UDP implementations. UDP-MIB::udpMIB The MIB module for managing 0:0:00:00.02 RFC1213-MIB::ip The MIB module for managing 0:0:00:00.02 implementations. SNMP-VIEW-BASED-ACM- View-based Access Control 0:0:00:00.02 SNMP-FRAMEWORK-MIB:: The SNMP Management 0:0:00:00.14 IP and ICMP implementations. MIB::vacmBasicGroup Model for SNMP. snmpFrameworkMIB Architecture MIB. Compliance SNMP-MPD-MIB::snmp The MIB for Message 0:0:00:00.14 MPDCompliance Processing and Dispatching. SNMP-USER-BASED-SM- The management information 0:0:00:00.14 MIB::usmMIBCompliance definitions for the SNMP User-based Security Model.
snmptable 명령의 예에는 -Ci 및 -Cb 옵션이 사용됩니다. 예를 들어 다음은 -Ci 옵션이 있는 snmptable 명령의 예입니다.
% snmptable -Ci SNMP_agent sunPlatFanTable SNMP table: SUN-PLATFORM-MIB::sunPlatFanTable index sunPlatFanClass 10 fan 11 fan 17 fan 23 fan 29 fan 30 fan 36 fan 42 fan
다음은 -Ci 옵션이 없는 snmptable 명령의 예입니다. 인덱스 열은 표시되어 있지 않습니다.
% snmptable SNMP_agent sunPlatFanTable SNMP table: SUN-PLATFORM-MIB::sunPlatFanTable sunPlatFanClass fan fan fan fan fan
다음은 -Ci 및 -Cb 옵션이 있는 snmptable 명령의 예입니다. 출력은 축약되어 있습니다.
% snmptable -Ci -Cb SNMP_agent entPhysicalTable index Descr VendorType ContainedIn SNMP table: ENTITY ?SNMPv2- 0 chassis -MIB::entPhysical SMI:zeroDotZero 1 Table
다음은 -Ci 옵션은 있지만 -Cb 옵션은 없는 동일한 snmptable 명령의 예입니다. 여기서도 출력이 축약되어 있습니다. 각 머리글에서 MIB 객체 이름이 반복됩니다.
% snmptable -Ci SNMP_agent entPhysicalTable index entPhysicalDescr entPhysical entPhysical VendorType ContainedIn SNMP table: ENTITY ?SNMPv2- 0 chassis 1 -MIB::entPhysical SMI:zeroDotZero
다음은 -Ci 및 -Cb 옵션이 있는 snmptable 명령의 또 다른 예입니다. 각 머리글에서 MIB 객체 이름이 반복되지 않습니다.
% snmptable -Cb -Ci SNMP_agent ilomCtrlAlertsTable SNMP table: SUN-ILOM-CONTROL-MIB::ilomCtrlAlertsTable in- Sever- Type Destin- Destin- SNMPVer- SNMP-Comm- Email Email dex ity ation- ation- sion unityOr- Event Event 1 criti- email ? 0.0.0.0 v1 public none none IP Email Username Class Type cal 2-15 dis- ipmi- 0.0.0.0 ? v1 public ? ? Filter Filter able pet
따라서 snmptable 명령에 -Cb 옵션을 사용한 경우 테이블 출력을 읽기가 더 쉽습니다.
다음은 SNMP 프로토콜 버전 3을 사용하는 snmptable 명령의 예입니다.
% snmptable -Cb -Ci -mALL -v3 -aMD5 -utestuser -Apassword -lauthNoPriv SNMP_agent:port sunPlatPowerSupplyTable SNMP table: SUN-PLATFORM-MIB::sunPlatPowerSupplyTable index sunPlatPowerSupplyClass 90 powerSupply 92 powerSupply 96 powerSupply
다음 snmptable 명령은 빈 테이블을 반환합니다.
% snmptable -Cb -Ci SNMP_agent sunPlatBatteryTable SUN-PLATFORM-MIB::sunPlatBatteryTable: No entries