The gstripchart program periodically reads data from a file, extracts a value, and displays these values in one of several formats. The default format is a graphical display similar to that of a stripchart recorder. Hence the name, "gstripchart".
On systems such as Linux, in which the system parameters are available in human-readable form in the /proc directory, the gstripchart program makes a dandy performance monitoring tool, similar to but more versatile than xload.
Instead of being limited to a few standard performance parameters, the gstripchart program can plot any time-variant parameter than can be read from a file or pipe. This ability to read data from a pipe provides a very versatile and easy to use method of setting up custom displays.
The gstripchart program determines the parameters to display by
reading a configuration file. The gstripchart program will first look
for a configuration file specified on the command line, then look for
a file named gstripchart.conf in the current directory, then look for
a file named .gstripchart.conf in the users home directory, then look
for a file named /etc/gstripchart.conf. If no configuration file is
found, the program is terminated.
The configuration file has a paragraph of configuration
information for each parameter to be ploted. Each of these paragraphs
are comprised of a series of RFC-822 style "keyword: value" pairs,
beginning with an "identifier:" line. A comment can be included by
putting a sharp sign (#) in the first column of a line.
The following keywords are available. Some are optional; some are
only used by certain display types; many have reasonable default
values, as described below.
On each iteration, a value to be displayed is obtained for each
parameter in the configuration file. The file named in the "filename"
line is opened -- either as a pipe if the filename begins with a pipe
character (|), or as a regular file otherwise -- and a line is read.
If a pattern was specified, lines are read until one is found that
contains the pattern string anywhere in the line. This line is split
into the number of whitespace seperated fields specified in the
"fields" line. Each of these fields is interpreted as a floating
point number.
A value is obtained by evaluating the "equation" line using these
field values. The first (or only) value is denoted by $1, the next by
$2, and so forth. The difference between the field values between the
last and the current iteration is denoted by ~1, ~2, and so forth.
The elapsed time in seconds between the last and current iteration is
~t. The requested update interval is $i (and the delta is ~i, but
will always be zero). All the usual infix arithmatic operators are
available.
If libgtop support has been compiled into the gstripchart program,
a value can be obtained from this library. This provides a portable
method of obtaining many system performance parameters. The following
libgtop parameters are available:
Note that the network statistics don't use the libgtop
library. Instead, the values are read directly from
/proc/net/dev, and so are only available under Linux.
These are all signed long integer quantities, except for uptime,
idletime, and the three loadavg values which are floating point
values.
Options
There are a few command line switches that can be used to alter the
behavior of the program.
-f, --config-file=FILE configuration file
-g, --geometry=GEOMETRY geometry
-i, --chart-interval=SECS chart update interval
-I, --chart-filter=SECS chart low-pass filter time constant
-j, --slider-interval=SECS slider update interval
-J, --slider-filter=SECS slider low-pass filter time constant
-M, --menubar add menubar
-S, --omit-slider omit slider
-t, --display-type=TYPE type of display
none: no display is produced (for debugging);
text: a textual numeric display is produced;
graph: a textual graphic display is produced;
gtk: use the default gtk-based graphic display.
--class=CLASS FIXME
--display=DISPLAY X display to use
--gxid_host=HOST FIXME
--gxid_port=PORT FIXME
--name=NAME FIXME
--no-xshm Don't use X shared memory extension
--xim-preedit=STYLE FIXME
--xim-status=STYLE FIXME
-?, --help Give this help list
--usage Give a short usage message
-V, --version Print program version
Configuration