Most network/system administrators I know suffer from a serious affliction I call Informatious Overloadicus (IO). This affliction causes administrators to crave as much information as is available.
Fortunately for those suffering from chronic IO, Linux offers up the mack daddy of information-gathering toolkits. One of these tools, xosview, provides a graphical display of several system-based performance measurements.
In this Daily Feature, I'll show you how to run this tool and how best to take advantage of its functionality.
What xosview does
It's very simple: xosview represents various system processes (such as CPU usage, load average, memory usage, swap space usage, network usage, interrupts, battery level, and serial port status) with color-coded horizontal bars (see Figure A).
|The default xosview window offers plenty of information for the most IO-stricken admins.|
Xosview runs on six platforms: Linux, NetBSD, FreeBSD, OpenBSD, some Solaris systems, and HPUX. You can download it from Freshmeat for use with 2.1 and 2.2 kernels. If you're using a kernel newer than 2.2 (and why shouldn't you be?), you'll need to get the source rpm from rpmfind and build it, like so:
su to root
rpm -ivh xosview
tar xfv xosview-1.7.3.tar
The xosview application should now be installed. Unfortunately, the above method only applies to OSs that support the rpm system. For those of you who need the source for the later version, I've created a tar file from the rpm; you can download it here. Once you grab that tar file, you simply need to run the commands:
tar xvzf xosview-1.7.3.tgz
and the application will install.
Not all of the options are supported on all platforms, and some of the meters might appear differently, depending on which OS you are using.
Simply enter the xosview command to run the default xosview application. It will open with the following monitors: LOAD (system load average), CPU (percentage of CPU used), MEM (memory used and shared, memory in buffers, and memory in cache), SWAP (how much of your swap partition is being used), PAGE (how often page swapping occurs), DISK (lets you watch as your disk is read, written to, and idle), and INTS (lets you view interrupts as they occur). These make up the default package, but I'm sure you will want to include more (I can see it in your eyes).
Of the available options, the most useful will be +net (displays incoming network traffic), +battery (shows percentage of battery available), and +page (shows when page swapping occurs). All three options can be sent via the command line.
First things first: Let’s call the xosview application from the command line and add the +net, +battery, and +page options with the command:
xosview +net +battery +page
which will open up an xosview session similar to that in Figure B.
|The +net option is handy for a quick take on network traffic.|
One other option is quite useful but cannot be sent via command line. The serial(0-9) option shows when input or output is flowing through your serial ports but it has to be called from your .Xdefaults file. To call up xosview and have a readout of serial port activity, you have to create an entry in your .Xdefaults file. Now, you may notice that your distribution of Linux no longer relies on the .Xdefaults file. (I believe Red Hat Linux did away with relying on .Xdefaults as of 7.0.) If you are using a later distribution and do not have an ~/.Xdefaults file, you can create one for this purpose. Fire up that favorite text editor and create this file with the following contents:
Where you see the asterisk (*) above, you will enter the number (0-9) of the serial port you would like to monitor.
Save this file; the next time that user opens xosview, he or she will see the SERIAL monitor.
The .Xdefaults file can come in handy beyond the serial option. Say, for instance, that you know you will always want the net and the page options available. You could make the following additions to your ~/.Xdefaults file:
You can also configure various options (via .Xdefaults) such as colors, size, borders, and labels. You can read about these in the xosview man page. (Run the command man xosview.)
The xosview application really should be a fundamental part of your daily IT breakfast. I’ve been known to secure shell into various machines, run xosview, and monitor the performance of those machines from the comfort of my own chair!
And should you need to kill xosview, simply put your cursor in the xosview window and type q. It will die safely and silently.
Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website getjackd.net.