xstatuspanel 1.1
14 May 2001
Copyright (c) 2000-2001 Rob McMullen (robm@akvo.com)
http://xstatuspanel.sourceforge.net/
ABSTRACT
========
xstatuspanel is a collection of system status monitors for Linux, all
bundled up into one X11 application. xstatuspanel has three goals:
* as resource-lightweight as possible (e.g. small memory and screen real
estate usage)
* monitor a lot of stuff
* have a good object oriented design
QUICK INSTALL
=============
./configure
make
make install
See the file INSTALL included in this directory for more complete
install instructions.
BACKGROUND
==========
This monitor program was originally written in about 1994 in C, and
I've been using it for all these years with the intention of rewriting
it in a much more clean fashion. Somewhere along the way, I got into
Java, then perl, and I lost interest in languages that required you to
do your own memory management.
Then, I changed jobs and unfortunately Java wasn't an option for what
we needed to do. I'm too much of a fan of OO to go back to C, so C++
was the target language for our project at work. The opportunity to
rewrite xstatuspanel as C++ became the opportunity to transfer my
skills from Java to C++.
For those looking for a more full-featured system monitoring tool, I'd
recommend checking out gkrellm. It has many more bells and whistles,
including plugins for extending the functionality of the monitor.
However, this comes with a cost: gkrellm typically requires more than
three times the memory of xstatuspanel:
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
585 rob 0 0 972 972 796 S 0.0 0.4 0:00 xstatuspanel
5139 rob 0 0 2948 2948 2360 S 0.0 1.5 0:00 gkrellm
Even xclock by itself consumes more memory than xstatuspanel!
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
585 rob 0 0 972 972 796 S 0.0 0.4 0:00 xstatuspanel
6701 rob 0 0 1428 1428 1192 S 0.0 0.7 0:00 xclock
FEATURES
========
xstatuspanel is a vertical stack of subwindows, each representing a
piece of information about the state of your computer. The subwindows
are, from the top down:
* date
* clock
* calendar (a tooltip-style window when mousing over the clock or the date)
* APM power meter
* load average
* instantaneous CPU load (individual graphs for each processor in
multiprocessor machines)
* memory usage
* swap space usage
* network packet traffic usage
* disk access usage
* graphical display of all 8 X11 cut buffers
* volume control of the sound card
* check for new email (experimental)
Mousing over the clock or the date pops up the calendar, which
displays the current month and the next month, highlighting the
current day. Mousing out of those two containers
The system load is averaged over 5 seconds in the scrolling display.
The instantaneous CPU load is computed from the idle time of each
processor. Processor usage is defined as 100% minus the idle time in
percent, so the bar directly corresponds to processor usage.
Memory usage does not include memory that is buffered or cached; only
that memory that is directly used or shared by processes.
The bar graph monitors for network traffic and disk access are
actually split bars, with the top bar indicating receive packets or
read blocks, and the bottom bar indicating transmitted packets or
written blocks.
When running under battery power, the APM power meter bar graph
changes from green to yellow to red as the battery drains.
The cut buffer windows display the contents of each of the 8 X11 cut
buffers, if the buffer stores text. Clicking the left mouse button in
one of the buffer windows causes that cut buffer to become the primary
selection, and highlights that window. The text is then available to
be pasted by a middle mouse button click in any other X window that
will accept a selection. A middle mouse click in any other cut buffer
window will copy the primary selection to that cut buffer.
Volume of individual mixer devices on the sound card are displayed in
individual horizontal bar graphs per mixer device. The volume levels
can be controlled by clicking and dragging the left button in the bar
graph.
The experimental mail checking stuff works for unix mail
(/var/spool/mail/) and IMAP mailboxes. Robust IMAP mail
checking is not easy, since some mail clients (Netscape Messenger
seems to be a big culprit) don't close their connections to the IMAP
server. They either don't indicate to the IMAP server that mail has
been read, or a second connection to the IMAP server isn't told that
the mail has been read by the first IMAP connection. Whatever; unless
you exit Netscape Messenger, xstatuspanel won't indicate that you have
read mail. The count of new messages will not get reset.
KNOWN ISSUES
============
* only works on Linux
* bar graph colors should be configurable
USAGE
=====
The program is typically run with the following command:
xstatuspanel [-geom geometry-spec] [-bg color] [-fg color] \
[-font XLFD-font-spec] [-h]
-geom geometry-spec
Sets the position of the application. Height is ignored, but width
does set the width of the app. Specify a dummy value for the height
in order to have correct syntax for the geometry specification.
Width defaults to 48 if no width and height are given.
-bg color
Specifies the background color.
-fg color
Specifies the foreground color of the graphics and text.
-font XLFD-font-spec
Specifies the font to use for everything in the entire application.
-h
Prints the usage statement.
CUSTOMIZATION
=============
xstatuspanel looks for the file .xstatuspanelrc in your home directory
to determine how to vertically stack the info panels. Without this
file, there is a default configuration that includes the most common
panels.
The config file is a simple format, one configuration parameter per
line. The configuration parameter may be a usage option (described
above), where the option and its parameter are on the same line
(separated by whitespace).
The configuration parameter may also be one of the following keywords
that describes the type of panel that will be placed vertically in the
window. The panels grow downwards, so each new panel named in the
config file will be placed below the previous panel. The available
panels are:
date
clock
battery
load
cpu
memory
swap
net
disk
cutbuffer
mixer
mail-spool display-name
mail-imap :: display-name
The mixer takes a list of mixer device names (separated by whitespace
or commas), as defined by SOUND_DEVICE_NAMES in the include file
/usr/include/linux/soundcard.h:
vol, bass, treble, synth, pcm, speaker, line, mic, cd, mix, pcm2,
rec, igain, ogain, line1, line2, line3, dig1, dig2, dig3, phin,
phout, video, radio, monitor
A horizontal bar graph will be created for each device named.
The mail configuration for unix spool mail only requires a
display-name that will be the text string displayed in the info panel
for this mailbox. The mail file will be determined from the
environmental variable MAIL.
Mail configuration for IMAP mail requires the server name, user name
on the mail server, the mail password, and a display name. This is a
security issue, as the password will be stored in plain text on the
filesystem. The only concession to security is that the
.xstatuspanelrc file must be readable only by the user. So, if mail
checking support is compiled in to xstatuspanel, the program will
display a warning message and abort unless the file permissions on
~/.xstatuspanelrc are set correctly.
EXAMPLES
========
The command I use when running out of my .xinitrc file is:
xstatuspanel -geom 48x1--1+0 -bg grey75 &
For a bigger font, try:
xstatuspanel -geom 64x1 -font "-b&h-lucida-medium-r-normal-*-*-100-*" &
xstatuspanel -geom 64x1 -font "-adobe-helvetica-medium-r-normal-*-*-80-*" &
EXAMPLE CONFIGURATION FILE ~/.xstatuspanelrc
============================================
-bg grey75
-font -schumacher-clean-*-*-*-*-6-*-*-*-*-*-*-*
date
clock
mail-imap my.mail.server:username:passwd RemoteMail
battery
load
cpu
memory
swap
net
disk
cutbuffer
mixer vol,pcm
DISCLAIMER
==========
xstatuspanel, Copyright (c) 2000-2001 Rob McMullen (robm@akvo.com)
xstatuspanel comes with ABSOLUTELY NO WARRANTY; for details see the
file COPYING included in the source distribution, or see the web site
http://www.gnu.org/copyleft/gpl.html for more information.