How can I get MIBs list from a remote server by using PHP?

半世苍凉 提交于 2019-11-28 02:24:25

If you just want a list of modules, see if your manager supports SNMPv2-MIB::sysORTable. This does not help you find the MIB files of course, but tells you what is supposed to be supported.

Quoting specs, sysORTable is:

"The (conceptual) table listing the capabilities of the local SNMP application acting as a command responder with respect to various MIB modules. SNMP entities having dynamically-configurable support of MIB modules will have a dynamically-varying number of conceptual rows."

Here is what I get for a standard Linux host :

snmptable -M +.  -m +ALL -v 2c -c public -Pu -Ci  <some ipaddr>  SNMPv2-MIB::sysORTable
SNMP table: SNMPv2-MIB::sysORTable

 index                                        sysORID                                              sysORDescr  sysORUpTime
     1          SNMP-MPD-MIB::snmpMPDMIBObjects.3.1.1         The MIB for Message Processing and Dispatching. 0:0:00:00.30
     2       SNMP-USER-BASED-SM-MIB::usmMIBCompliance         The MIB for Message Processing and Dispatching. 0:0:00:00.30
     3 SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance                   The SNMP Management Architecture MIB. 0:0:00:00.30
     4                            SNMPv2-MIB::snmpMIB                      The MIB module for SNMPv2 entities 0:0:00:00.30
     5                                TCP-MIB::tcpMIB         The MIB module for managing TCP implementations 0:0:00:00.30
     6                                     IP-MIB::ip The MIB module for managing IP and ICMP implementations 0:0:00:00.30
     7                                UDP-MIB::udpMIB         The MIB module for managing UDP implementations 0:0:00:00.30
     8        SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup               View-based Access Control Model for SNMP. 0:0:00:00.30
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!