Monitor your Linux system

Awareness of your Linux system's performance and health is very important, especially if you are using Linux in a critical role. The load on your CPU, memory and hard disk drive can be used to explain the poor performance of applications or to find which application is causing your system to slow down.

An extensive range of Unix shell tools exists solely to report this information. For the average user, these can be limited, because they often show information about only one system resource at once. For example, the top process load tool will tell you what programs are using CPU or memory; it can not tell you in the same window the load on the hard disk drive.

When it comes to finding this information, Bill Wilson's GKrellM (GNU Krell Monitors) is a practical and easy-to-use solution.

Like the programs top, ps and free, GKrellM interprets the information from the /proc file system and translates into an easy-to-read form. Unlike those programs, GKrellM runs all these monitors inside one window, reducing the complexity of analysing system resource information. On top of this, GKrellM has a simple, compact and attractive Gtk and Imlib-based monitoring interface (see FIGURE 1).


GKrellM requires that you have a few graphics libraries installed already: glib, gtk+ and Imlib. The latest versions of these have been included on the cover CD. To install, unpack and build them according to the INSTALL document in each package.

Once you have done this, you can install GKrellM. If you are using Red Hat 7.0, you should use the RPM version 4 package gkrellm-1.0.3-1-rh7.i386.rpm. If you are using any other distribution with RPM, you should use the package gkrellm-1.0.3-1.i386.rpm. To install the RPM package, issue the following command as root:

#rpm -ivU

Where is the RPM package for your system. Alternatively, if you do not use RPM or prefer manually building applications, you can install from source. The source is located in the file gkrellm-1.0.3.tar.gz.

Using GKrellM

To start GKrellM, all you need to do is run the following command at a terminal console within X Windows:


This will bring up the GKrellM panel. The top panel shows the date and time on the host which GKrellM is being used. This is useful for noting patterns in load average as well as monitoring the time on servers in different time zones.

The next panel maps CPU load average. This can be helpful for users who want to know just how much CPU their programs are using. The third panel graphs the number of processes running on the system over time, as well as the number of users. This is very useful for administrators working in a multi-user environment: performance can be linked directly to the number of users on a Linux machine.

The panel underneath this graphs the load on your hard disk drives. Such information can be input in diagnosing performance problems with your Linux system.

Under this panel is network load information. There will be a separate graph for each network interface, such as an Ethernet card, PPP over a modem or ADSL. This will tell you the extent to which you are utilising your bandwidth, as well as alert you to network spikes - explaining decreased performance.

The final panel gives physical and virtual memory usage in megabytes.

By right-clicking each section of the panel, you can change the way information is delivered. By default, only a graph of the moving average is given. Once enabled by right-clicking, however, real-time numerical statistics can also be given.

Advanced configurations

GKrellM is also highly configurable. It can be extensively "themed", which means a user layer other than the default can be easily applied. The feel of GKrellM can be dramatically changed with different themes (see FIGURE 2).

A number of themes have been included on the cover CD. To install a theme, unpack it to .gkrellm/themes off your home directory, then run the following command within X Windows:

$gkrellm -t

If you install the DirtChamber theme (FIGURE 2), the theme name is dirtchamber.

You can also run though all the themes installed by right-clicking the top of GKrellM window (see FIGURE 3). Either way, you have complete control over the appearance of your GNU Krell Monitors. Those who have had more experience with X might like to make their own themes; if you are interested, there is more information at

GNU Krell Monitors are a great way to monitor system resources from within X. Not only can you get accurate and useful information at a glance, you can also integrate GKrellM into the look and feel of your desktop.