SNMP information query from Linux
In this section you can find information on how to query SNMP values using the Linux snmpget and snmpwalk commands. These commands come as part of the net-snmp package in most Linux distributions. To query information you need to supply an OID value to these commands.
A list of Ozeki SNMP OIDs can be found in the Ozeki SNMP Management Information Database (MIB).
To install the SNMP library for your linux distribution, please issue the following command:yum install net-snmp net-snmp-utils
After the SNMP library has been installed you can use snmpget to query information from your Windows machine. For example to get the uptime of the Windows computer that has an IP address of 192.168.90.193 you should issue the following command:
snmpget -v 1 -c public -O v 192.168.90.193 188.8.131.52.184.108.40.206.0
In this command you can see the value "220.127.116.11.18.104.22.168.0". This is the OID of the uptime. To get information about Ozeki NG you should use an OID specified in the Ozeki MIB. For example the OID .22.214.171.124.4.1.333126.96.36.199 would give you the version number of the installed Ozeki NG SMS Gateway. To query this information, please issue the following command:
snmpget -v 1 -c public -O v 192.168.90.193 .188.8.131.52.4.1.333184.108.40.206
Of course you have to replace the IP address (192.168.90.193) to the IP address of the computer that you want to query (this computer should have Ozeki NG SMS Gateway and the Ozeki SMS SNMP extension installed).
To get all the values that are provided by Ozeki NG, you should initiate an SNMP walk request with the root OID of Ozeki. The command to achieve this goal would be:
snmpwalk -v 1 -c public 192.168.90.193 .220.127.116.11.4.1.33355
People who read this also read...