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.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Profiles and RC Files
- Astronomy for KDE
- Maru OS Brings Debian to Your Phone
- Understanding Ceph and Its Place in the Market
- Snappy Moves to New Platforms
- Git 2.9 Released
- OpenSwitch Finds a New Home
- What's Our Next Fight?
- The Giant Zero, Part 0.x
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide