Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SNMP troubleshooting

Posted on 2006-07-10
9
Medium Priority
?
1,848 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 400 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 800 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
Understanding Web Applications

Without even knowing it, most of us are using web applications on a daily basis. Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We often confuse these web applications tools for websites.  So, what is the difference?

 
LVL 1

Assisted Solution

by:rootcoolk
rootcoolk earned 200 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 600 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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

This article is a collection of issues that people face from time to time and possible solutions to those issues. I hope you enjoy reading it.
This month, Experts Exchange’s free Course of the Month is focused on CompTIA IT Fundamentals.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

618 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