Tweaking Tux, Part 5
Last time around, I thought I might wrap this series up, move on to something new. But then, out of nowhere, a reader sent me a seemingly harmless little e-mail. "Pssst. Hey, wanna see a really cool system monitor program? Free. GPL stuff even. Looks great. Waddayasay?" I thought, sure, couldn't hurt to have a look. Right?
You might remember that last time I told you about all those neat dockable apps I have scattered over my desktop--performance monitors, clock calendars, CD players and weather apps. It's one of things I think is really great about WindowMaker stuff. What I discovered at the end of that harmless e-mail was something like my favorite WindowMaker applet on steroids. Enough teasing. Do what I did. Surf on over to http://web.wt.net/~billw/gkrellm/gkrellm.html and get yourself a copy of GKrellM.
GKrellM is more than just a system performance monitor. Looking at it, I imagine a stack of stereo equipment components, separate tuner, amplifier, DVD, tape deck, etc. In this case, it displays time and date, CPU, processes in the run queue, disk activity, network interface stats, memory, swap, e-mail notification (complete with animated mail icon and Tux himself bouncing back and forth), and the list goes on. It's customizable and it's fun. There's more but, first, let's get this thing running.
Building GKrellM is easy. I downloaded the latest source (version 1.01) and built it like this.
tar -xzvf gkrellm-1.0.1.tar.gz cd gkrellm-1.0.1 make make install
If you feel like saving yourself the trouble of a compile, there are Debian and RPM packages available as well. Once you have the program installed (in whatever way you chose), simply type gkrellm & and you are off. Notice the image off to the right. This is not GKrellM's default look, but one of many skins that can be downloaded to change the look of the package. The one you see in my example is called "Sunset".
The official theme site for GKrellM is Muhri's web site at http://www.muhri.net, where you'll find enough GKrellM skins to keep you going for quite some time. There are over one hundred GKrellM skins on the site.
To install a theme, download the one you like, change directory to $HOME/.gkrellm/themes and extract the tarred and gzipped file like this:
cd $HOME/.gkrellm/themes tar -xzvf /path_to/theme_name.tar.gz
To change the look of the monitor (and do any other customization), right-click on the menu bar. In my sunset image, the title bar says "scigate", the name of one of my servers. The menu pops up with "Configuration F1" or "Theme". I don't use the theme switcher here, but rather change things through the configuration menu. What the "Theme" menu does at this level is allow you to switch sequentially from one theme to another, either up or down. The configuration menu, on the other hand, displays them in a nice menu and allows you to choose any one and apply the changes until you are satisfied. You should also familiarize yourself with the built-in functions and change them to suit your own tastes and requirements.
I've told you about configuring themes, but you can do quite a bit more than that. A lot is packed into the display and some of that information is sitting just below the surface (whatever surface you happen to have selected). Clicking on the various "components" on the stack turns options on or off. For instance, if I click on the "Proc" display, it turns on and off a text display of the number of active processes and users. Similarly, if I click on the "eth0" network display, it shows the average transfer rate. Right-clicking yields different results than left-clicking, so explore.
Here's another great thing about GKrellM. There are plugins available that let you add functioanlity to the basic product. For instance, on my system, I have a plugin called GKrellWeather from Franky Lam. This little plugin adds another component to the GKrellM stack, a nice thin one that alternates between atmospheric conditions, temperature, dewpoint, wind speed, etc. All this information is gathered from my local airport weather station (code CYYZ).
Installing plugins is a little different. In the case of GKrellWeather, I downloaded the source, extracted it and ran make. The make install did all the work of installing the plugin. There are a number of plugins available with links from the GKrellM web site.
Now, I can't say that GKrellM has permanently cast out my other dockable apps. I still start WMmon, wmCalClock and wmWeather when the mood takes me. Their displays tend to be larger and, sometimes, easier to read. Still, this is one beautiful app, one I'll no doubt run in conjunction with other programs--such is my mania for dynamic system feedback. Scotty, I must have more stats!
Before we wrap this up, I want to throw one other command line monitor your way. ( I'll never give up the command line. Never!) From a shell prompt, type the command pstree. You should get something that looks like this.
init-+-apmd |-artsd |-atd |-crond |-fontfs |-gpm |-httpd---9*[httpd] |-identd---identd---3*[identd] |-inetd |-11*[kdeinit] |-kdeinit-+-kdeinit | |-kdeinit-+-2*[bash---telnet] | | |-bash---su---bash---gkrellm | | |-bash---bluefish | | `-bash | |-kdeinit---bash---su---bash---pstree | `-kteatime |-kdeinit---cat |-kdesud |-kflushd
What's neat about this command is that you get a graphical view of what processes are running on your system and what process started those processes. For instance, you can see that kdeinit is responsible for a fair number of processes. From my KDE desktop, I started a bash shell and from that shell, I started GKrellM and bluefish, an HTML editor I'm pretty fond of. The display is somewhat longer than what you see here, but I've trimmed it down a bit. You can also see from here that all processes start with "init", which is process ID 1.
You can modify the display with switches. For instance, a "-G" will show you the same display but with nice graphical lines instead of the dashed ones you see above. An "-a" flag will display all command line arguments. By default, pstree only displays the command name. Here's a small sample with no flags set.
|-sendmail |-smbd---3*[smbd] |-syslogd `-xfs
Here is the same display with the "-a" option set.
|-sendmail |-(smbd) | |-smbd -D | |-smbd -D | `-smbd -D |-syslogd -m 0 `-xfs -droppriv -daemon -port -1
The smbd process now shows the parent process in parentheses, which indicates that the process is swapped out. Notice also that all three of its children are visible while they were only flagged as "3*" before. Similarly, have a look at the xfs command that now displays all the flags with which it was called. The ps command is great for telling you every little thing that is going on, but pstree provides you with a graphical, hierarchical means of finding that information.
I started out this column with the hint that next time we are going to do something different and, this time, I mean it. So, be sure to tune in for something completely, er, um, different. Until then, remember to give Tux a tweak. You both might enjoy it.