SNMP command line tools - SNMPWALK, SNMPGET - Examples

 
Author
Message
SysAid VP Product
1166
 
Dear SysAid Lab members !


For those of you who want to make the most out of the SNMP network scanning - I would like to forward all of your attention to an open source command line tool for snmp queries you can use to learn a lot about your devices and then configure SysAid to extract and save that information.

This net-snmp tool will allow you to be able to send simple queries to your SNMP devices and receive the values.

You can also run a full SNMP walk command and get all the values from the device.
We developed a small SNMP tool based on the command line tool with a user interface you can simply download and run the Windows version. (Linux and Mac versions are also available)

Learn more about the tool Here



If you wish to go for the command line tool follow the instructions below:

Download the third link on the download page or click this direct link : net-snmp-5.4.2.1-1.win32.exe


Perform a default installation – next next….


Open a command line prompt in Windows: (cmd)


The following command lines are usefull:

Get value of a single OID:
snmpget -v1 -c public <device IP> OID
Example : snmpget -v1 -c public 192.168.1.1 1.3.6.1.2.1.43.5.1.1.1.1.0


Get all values of a sub tree:
snmpwalk -v 1 -c public <IP-ADDRESS> mib-2
snmpwalk -v 1 -c public <IP-ADDRESS> private
snmpwalk -v 1 -c public <IP-ADDRESS> mgmt

The outputs are long so you can add "> file1.txt" to the end of each command : snmpwalk -v 1 -c public <IP-ADDRESS> mgmt > mgmt.txt

If you find OID-s of interesting information for printers like page counter , toner level , or any other interesting information for network devices – please post them here !


Good Luck !
Oded

This message was edited 9 times. Last update was at Jan. 18, 2017 09:52 AM

SysAider
2
 
Hey ! Nice to know !! Thanks!

Good Call !
Guillaume, IT.
SysAider
7
 
Thank you for this tool. Previously, I had to log on to a linux box to get this functionality. Now I can do this from my pc.
Lev
SysAid Mod
512
 
Here are some OID's i have found:

1.3.6.1.2.1.43.10.2.1.4.1.1 HP Printer Total Page Count
1.3.6.1.2.1.47.1.1.1.1.11.1 ProCurve Serial
1.3.6.1.2.1.43.5.1.1.17.1 HP Printer Serial

If some body will give an idea for OID's I'll try to find them.

Those 2 free tools can help you as well.

HiliSoft - MIB browser

Script Logic - sl360 tool suit (there are nice free tools not only for SNMP)

Lev
SysAider
1
 
hi,
I installed succefully the net-snmp.exe but when I tried to tape some comands in the cmd like snmpget or snmpwalk I get a message like that:
'snmpget' is not recognized as internal command
or external, operable program or batch file.
plz can anyone help me and thanks
SysAider
2
 
kamika wrote:hi,
I installed succefully the net-snmp.exe but when I tried to tape some comands in the cmd like snmpget or snmpwalk I get a message like that:
'snmpget' is not recognized as internal command
or external, operable program or batch file.
plz can anyone help me and thanks


position you cursor to the folder that you install SNMP.
SysAider
2
 
I found OID for RICOH counter:
C:\snmp\bin>snmpget -v1 -c public 192.168.1.81 .1.3.6.1.2.1.43.10.2.1.4.1.1
SNMPv2-SMI::mib-2.43.10.2.1.4.1.1 = Counter32: 45069


I used:
C:\snmp\bin>snmpwalk -v 2c -c public 192.168.1.80 >80.txt
after that open 80.txt and compare counter from machine and txt file

note* in snmpwalk I use ver 2 of snmp protocol.

SysAider
1
 
Provided is a whitepaper I wrote a while back on Net-SNMP and using SNMP at the Command Line - CLI

I also have a section in here about using NET-SNMP in scripts


https://www.tobiassystems.com/?page_id=944

Hopefully this helps everyone
SysAider
1
 
Is this thread still alive? I have a few questions on information i am trying to gather.

Thanks,

Matt
SysAid Community Manager Product Team
4428
 
Hi Matt,

You're welcome to ask questions, we're listening

Cheers,
Danny
SysAid VP Product
1166
 
You can watch an snmp scan in action from within SysAid network discovery

This message was edited 2 times. Last update was at Jan. 16, 2017 11:36 AM

SysAid VP Product
1166
 
You can Watch a short video of the snmp tool in action.
SysAider
4
 
Would it be possible to add MIB file importing to the tool?
I think that would be very helpful with interpreting the information that comes back.