Solved

SNMP troubleshooting

Posted on 2006-07-10
9
1,827 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
  • 2
  • 2
  • 2
  • +2
9 Comments
 
LVL 5

Assisted Solution

by:xylog
xylog earned 100 total points
Comment Utility
To see the status of the snmp daemon:

 /etc/init.d/snmpd status


0
 
LVL 57

Accepted Solution

by:
giltjr earned 200 total points
Comment Utility
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
Comment Utility
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
 
LVL 1

Assisted Solution

by:rootcoolk
rootcoolk earned 50 total points
Comment Utility
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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 

Author Comment

by:jibranilyas
Comment Utility
# /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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Lets look at the default installation and configuration of FreeProxy 4.10 REQUIREMENTS 1. FreeProxy 4.10 Application - Can be downloaded here (http://www.handcraftedsoftware.org/index.php?page=download) 2. Ensure that you disable the windows fi…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
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…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now