snmp
ref
query local system info 範例
http://www.liquidweb.com/kb/how-to-install-and-configure-snmp-on-centos/mib module
http://net-snmp.sourceforge.net/wiki/index.php/TUT:Writing_a_MIB_Module
注意
- snmp 目前到 v3
https://en.wikipedia.org/wiki/Simple_Network_Management_Protocol
- snmp 目前到 v3
- config
- yum install net-snmp net-snmp-utils
- 載入廠商提供的 Mib file
create mib file
- http:\/\/stackoverflow.com\/questions\/3906916\/question-about-snmp-mib-file
- http:\/\/www.net-snmp.org\/wiki\/index.php\/Agent_Architecture
- http:\/\/www.net-snmp.org\/wiki\/index.php\/TUT:Writing_a_MIB_Module#Writing_Your_First_Module
- http:\/\/www.net-snmp.org\/wiki\/index.php\/TUT:Writing_a_Dynamically_Loadable_Object (看這)
- http:\/\/blog.chinaunix.net\/uid-23097562-id-2550089.html (看這)
snmp python
- convert mib file into pysnmp form
- http:\/\/pysnmp.sourceforge.net\/faq\/pass-custom-mib-to-manager.html
- mibdump.py \/opt\/mymib\/my-mib, 轉換後, 會存在 \/root\/.pysnmp\/mibs\/MY-MIB.py
commands
- snmpwalk -m IFT-SNMP-MIB.mib -v 1 -c public 172.27.112.213 .1
snmpget -v 1 -c public 172.27.112.109 iso.3.6.1.2.1.1.1.0
要將 mib file 放在 /root/.snmp/mibs