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 1.3.6.1.2.1.1.3.0

In this command you can see the value "1.3.6.1.2.1.1.3.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 .1.3.6.1.4.1.33355.1.1.1 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 .1.3.6.1.4.1.33355.1.1.1

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 .1.3.6.1.4.1.33355

Dig deeper!
People who read this also read...

More information