[KLUG Members] What is this snmp thing all about?
Bruce Smith
members@kalamazoolinux.org
25 Aug 2002 20:14:56 -0400
Here is a copy/paste from a e-newsletter I get.
It's a good introduction to SNMP, and is a good way to play with SNMP
using the standard utilities that come with Redhat Linux. Install it,
and browse some network devices to see what it can do. Then you can try
changing configurations on devices that allow it.
It's not real management software, but IMO gives a good idea of what
SNMP can and can't do. Adam recommended a good Linux management package
on this list awhile back. Search, or wait, I'm sure he'll say again.
<------------------------------------------->
OBTAIN SYSTEM INFORMATION WITH UCD-SNMP
Most Linux distributions come with a useful server called ucd-snmp,
which is a Simple Network Management Protocol (SNMP) server for Linux
systems. Many network appliances, such as printers and firewalls, use
SNMP to provide information about themselves. Linux uses SNMP to obtain
information about a given Linux system.
Make sure you have the ucd-snmp package installed. You will need to
configure it via the configuration file, which is usually located in
/etc or /etc/snmp as snmpd.conf. (As a word of caution: The default
configuration file is difficult to read because it also shows examples
of other tools with which the ucd-snmp package comes.)
A very simple snmpd.conf file might look like the following:
com2sec somerandomstring default somerandomstring
group somerandomstring v1 somerandomstring
group somerandomstring v2c somerandomstring
view all included .1
access somerandomstring "" any noauth exact all none none
syslocation myhost.mydomain.com
syscontact Joe Admin <joe@localhost>
This is the bare minimum that you will need. In the default
configuration file, you will see that "somerandomstring" is replaced by
public. You don't want this. Instead, pick a unique name at random,
something other than public, to prevent unauthorized individuals from
reading information on your system.
Next, to get information on the system, use the following command:
# snmpwalk -v 1 localhost somerandomstring system
This will give you some system information, such as the system
description (kernel information), uptime, location, and contact.
You can perform other queries, as well, some of which are shown as
examples in the configuration file. You can also configure snmpd to
provide process information, disk usage information, and much more.
----------------------------------------
--------------------------------------------
Bruce Smith bruce@armintl.com
System Administrator / Network Administrator
Armstrong International, Inc.
Three Rivers, Michigan 49093 USA
http://www.armstrong-intl.com/
--------------------------------------------