UNIX / Linux / OS X

User rating:
4.8 (4 ratings)

1. What is UN*X?

UN*X is a generic term, meaning Unix-like Operating Systems. This includes Linux, OS X, FreeBSD, OpenBSD and OpenSolaris.

2. Server setup

2.1. Installing Net-SNMP

You need to have Net-SNMP installed on your system. To know if you have Net-SNMP installed, type snmpd --version in a terminal. If you have Net-SNMP installed, you should see a text similar to this:

NET-SNMP version:
Web: http://www.net-snmp.org/
Email: net-snmp-coders@lists.sourceforge.net

Net-SNMP is installed like this in Ubuntu and Debian:

sudo apt-get install snmpd
sudo apt-get install snmp

This depends on the age of your distribution.

2.2. Configuring Net-SNMP

2.2.1. Setting the community string

Edit the file /etc/snmp/snmpd.conf (this requires sudo privileges). You should uncomment line under agent behaviour that says.

agentAdress udp:161,udp6:[::1]:161 

in order to listen for connections on all interfaces available. you should also make sure that you give access to basic system information

rocommunity public

If you are not sure how to configure Net-SNMP to suit your needs, you can just replace the whole file content with the above line.

2.2.2. Enable access to all hosts

Now edit the file /etc/default/snmpd, making sure that the row that begins with SNMPDOPTS does not contain any trailing addresses. For example, if the row in question is:

SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid'

It becomes:

SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid'

Now that you have changed the configuration of snmpd, you need to restart it. Do that by typing the following:

/etc/init.d/snmpd restart

3. LoadUI Setup

In LoadUI, it is pretty straight-foward to setup the monitor. Just open the Monitors tab in the bottom pane of your project view, select UN*X in the toolbar operating systems category, and you should see the Monitor Wizard (both pages shown below).


Option Description
1_snag_evi The name you want to use to describe the Unix/Linux machine
2_snag_evi The hostname or IP address of the machine
3_snag_evi The port used to communicate with the machine. This is usually 161, but it may be specified in the SNMP config file (in the remote machine)
4_snag_evi The SNMP version to use
5_snag_evi SNMP Community String. It must match the one specified in the SNMP config file (in the remote machine)

4. Troubleshooting

Make sure that no firewall is blocking the port used in between the server and loadUI.

5. Available statistics

The available statistics is a subset of the SNMP MIB’s called ucdavis (including the diskio module) and mib-2. Exactly which statistics that are available may differ depending on your server configuration, but the following list is what you get on a standard Ubuntu server:

  • CPU
    • Usage (%)
  • Disk (one set of statistics per device)
    • Total Size
    • Used
  • Misc
    • Number Of Processes
  • RAM
    • Total Size
    • Used
  • Swap
    • Total Size
      • Swap space
      • Virtual memory
    • Used
      • Swap space
      • Virtual memory

5.1. Disk I/O

If you compile Net-SNMP yourself, you need explicitly include the diskio module for it to be available. This is done like this:

./configure –with-mib-modules=ucd-snmp/diskio