W
W
wolverine7772019-06-13 12:18:14
linux
wolverine777, 2019-06-13 12:18:14

Why do snmpwalk vs snmpget work differently in different cases?

Hello,
I don’t understand why in the case of checking the processor load in the case of snmpwalk, everything is fine, while snmpget for some reason gives out "No Such Instance currently exists at this OID" (whereas everything is fine in snmpd.conf).
However, when it comes to free disk space - both commands work fine (see text below)

[email protected]:~$ snmpwalk localhost -v2c -c public .1.3.6.1.2.1.25.3.3.1.2
HOST-RESOURCES-MIB::hrProcessorLoad.196608 = INTEGER: 1
[email protected]:~$ snmpget localhost -v2c -c public .1.3.6.1.2.1.25.3.3.1.2
HOST-RESOURCES-MIB::hrProcessorLoad = No Such Instance currently exists at this OID
[email protected]:~$ snmpget localhost -v 2c -c public .1.3.6.1.4.1.2021.9.1.7.1
UCD-SNMP-MIB::dskAvail.1 = INTEGER: 26871144
[email protected]:~$ snmpwalk localhost -v 2c -c public .1.3.6.1.4.1.2021.9.1.7.1
UCD-SNMP-MIB::dskAvail.1 = INTEGER: 26871144

Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Valentine, 2019-06-13
@vvpoloskin

You can see from the output.
Because what is actually requested for CPU load is oid .1.3.6.1.2.1.25.3.3.1.2. 196608 , but since you don't know the number in advance, a recursive walk is done inside .1.3.6.1.2.1.25.3.3.1.2. Conclusion - status.

C
CityCat4, 2019-06-13
@CityCat4

Because these programs are a little bit different.
snmpwalk will take data from the specified OID or its subtree , if there is no data in the OID
snmpget will take data from the specified OID, if there is no data in it, we will get a drum over the shoulder
man snmpget
man snmpwalk
(everything is clearly written right from the first line of the mana)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question