Solved

SNMP troubleshooting

Posted on 2006-07-10
9
1,841 Views
Last Modified: 2008-01-09
I installed net-snmp on Ubuntu machine, but i can't seem to pull any data from remote snmp agents.
I am using a nagios plugin to test for that, but it timesout.

How can i verify that my SNMP server is running and how do i verify if my SNMP agent is running?
If you can give a way to test my snmp confgurations
Please advise, Thanks.

p.s. when i ran

ps aux | grep snmpd

i didn't get any results... so i am guessing my snmp daemon isn't running...
0
Comment
Question by:jibranilyas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +2
9 Comments
 
LVL 5

Assisted Solution

by:xylog
xylog earned 100 total points
ID: 17078077
To see the status of the snmp daemon:

 /etc/init.d/snmpd status


0
 
LVL 57

Accepted Solution

by:
giltjr earned 200 total points
ID: 17078526
issue command:

     netstat -anl

look for something like:

     udp        0      0 0.0.0.0:161                 0.0.0.0:*
0
 
LVL 1

Expert Comment

by:rootcoolk
ID: 17078662
Run 'ps' command to see if snmp server is running or not:

# ps -aux | grep snmp

Output:
root   5512  0.0  2.3  5872 3012 pts/0    S    22:04   0:00 /usr/sbin/snmpd

or yuou can  
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 1

Assisted Solution

by:rootcoolk
rootcoolk earned 50 total points
ID: 17078777
Run 'ps' command to see if snmp server is running or not:

# ps -aux | grep snmp

Output:
root   5512  0.0  2.3  5872 3012 pts/0    S    22:04   0:00 /usr/sbin/snmpd

Or you can run following two commands as well:

# lsof -i :199
Output:
COMMAND  PID USER   FD   TYPE DEVICE SIZE NODE NAME
snmpd   5512 root    4u  IPv4  34432       TCP *:smux (LISTEN)

OR try out netstat command:

# netstat -natv | grep ':199'
Output:
tcp        0      0 0.0.0.0:199             0.0.0.0:*               LISTEN

listing on port 199

TO start service for SNMP Server Run the commands:
# service snmpd start

Make sure snmpd service starts automatically, when linux comes us (add snmpd service):
# chkconfig --add snmpd

Prot for SNMP
# 161/udp SNMP
# 162/udp SNMPTRAP
# 391/tcp SynOptics SNMP Relay Port
# 391/udp SynOptics SNMP Relay Port
# 1993/tcp cisco SNMP TCP port
# 1993/udp cisco SNMP TCP port
0
 

Author Comment

by:jibranilyas
ID: 17081414
# /etc/init.d/snmpd status
-bash: /etc/init.d/snmpd: No such file or directory

# lsof -i :199
no output, just got the prompt back

# ps -aux | grep snmp
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
root     15566  0.0  0.3   3060   748 pts/0    R+   23:11   0:00 grep snmp

#netstat -anl
(only listing udp)

udp        0      0 0.0.0.0:514             0.0.0.0:*
udp        0      0 10.100.1.161:137        0.0.0.0:*
udp        0      0 0.0.0.0:137             0.0.0.0:*
udp        0      0 10.100.1.161:138        0.0.0.0:*
udp        0      0 0.0.0.0:138             0.0.0.0:*

So, it turns out that snmp is not running...


Now, when i do troubleshoot and get snmp running and i want to see if i can get snmp data from remote machines, how do i accomplish that ???
is it as simple as typing
# snmpwalk 10.10.1.100 public
?????

0
 
LVL 5

Expert Comment

by:xylog
ID: 17082797
There is a good FAQ on the net-snmp package here: http://net-snmp.sourceforge.net/docs/FAQ.html
0
 
LVL 1

Assisted Solution

by:ncbowden
ncbowden earned 150 total points
ID: 17082801
I think that the syntax that you want is :

snmpget -v 1 -c <community_name> <ip_address> sysDescr.0

This will pull back the system description for the device if you can contact it via SNMP.

If you are not using SNMP v1, then you may have to modify the -v parameter to 2c or 3, but v1 is fine for most places.

HTH

Nigel.
http://www.bowden-software.com
0
 

Author Comment

by:jibranilyas
ID: 17082892
thanks ncnbowden.. it worked.

# snmpget -v 2c -c public 10.10.1.150 sysDescr.0
SNMPv2-MIB::sysDescr.0 = STRING: Hardware: x86 Family 6 Model 9 Stepping 5 AT/AT COMPATIBLE - Software: Windows 2000 Version 5.1 (Build 2600 Uniprocessor Free)

It also worked when i put "-v 1" i.e. snmp version 1, so I guess my question is how do i know which version of SNMP is the remote machine (10.10.1.150) is running..  
0
 
LVL 1

Expert Comment

by:ncbowden
ID: 17083990
Its quite tricky to figure out.

Many SNMP agents (as you have seen) will support both V1 & V2C at the same time.

I don't have a definitive answer for you, apart from querying the device (as you have) with both the V1 & V2C parameter from Net-SNMP, and seeing which one answers. In your case, it supports both !

The other answer, I guess, is to consult the vendor docs for the SNMP agent.

HTH

Nigel.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an article about my experiences with remote access to my clients (so that I may serve them) and eventually to my home office system via Radmin Remote Control. I have been using remote access for over 10 years and have been improving my metho…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question