This is a free and highly configurable text-based system monitor for GNU/Linux systems.  It can display any/all of system load, CPU utilization, RAM/swap utilization, and network utilization, as well as the current date/time.  You can choose whether to display text graphs with each/all of the stats you want it to display.


I use this program at the bottom of my desktop, so pay attention to the very bottom 14 pixels in these screenshots:

in white
in black
with other stuff
with other other stuff

The Details

This is what you get when you run antsysmon --longhelp:


antsysmon, by Anthony DiSante,

antsysmon is a highly configurable system monitor for GNU/Linux systems.  It
is text-based, but it can display "graphs" made of text.  It can show any or
all of:
	system load average
	current utilization of CPU, RAM, swap, network (with independent TX/RX)
	current date/time

It runs forever and updates once per second.  It is designed to be used within
a terminal (probably swallowed by a window-manager module) that is sized to
only show one line of output, so that each new line seamlessly replaces the
last one, and only the values/graphs will appear to change.

There is just one mandatory argument: either --fields or --preset.  The 
--fields argument can accept any/all of:

	c CPU
	l load
	m memory (RAM)
	s swap
	t transmitted network data rate
	r received network data rate
	d date/time

So "antsysmon --fields dlm" will display the date, load, and memory usage, in
that order.  There are currently a few presets you can use:

"antsysmon --preset log" fits everything into 76 columns:

20040426-073858 CPU: 10% Load: 0.24 RAM: 76% Swap:  0% TX:   31KB RX:   93KB

"antsysmon --fields lcmstr --preset one-per-line" looks like this:

	with --show-graphs:			without --show-graphs:

	Load:[----------]   0.37		Load....0.34
	CPU :[##########]    97%		CPU.....100%
	RAM :[########--]    77%		RAM......82%
	Swap:[----------]     0%		Swap......0%
	TX  :[####------]   12KB		TX.......4KB
	RX  :[#---------]   29KB		RX.....138KB

Then there are two presets called ant-full and ant-half that fit nicely along
a single line at the bottom of my 1280x1024 screen, looking something like 
this (truncated here):

RAM: 80%   Swap: 0%    RX:[#----] 49KB    TX:[##---] 13KB    Mon Apr 26 / 07:51

If you are going to use the network TX or RX fields, you'll at least want to
set the --max-tx-value and --max-rx-value fields, so that the graphs display
something meaningful for your connection.  (They default to 400 RX and 32 TX,
for my cable connection; the values are in KB by default.)



Here is the full option list.  Remember, you need to use at least --fields or 
--preset.  If you use other options at the same time as --preset, the other 
options will take precedence.

--fields [clmsrtd]
--show-graphs   By default, graphs are not displayed.

Field widths: the max number of chars that a given value will take up.  For
example, in "TX:[##---]  7KB" the --tx-field-width is set to 3, and the seven
is currently only using one of those 3 slots.  The other two are filled with
--spacer-char which defaults to an actual space.  (Note that the unit KB is not
part of the field width.)


--spacer-char   This is what fills any unused field width
--colon-char    This comes after the label, as in "TX:"
--blink-colons  Replace the colon with a space every-other-second

Graph widths: the number of chars in the graph, not counting the brackets.  You
can set them all at once by setting --global-graph-width instead; then you can
override individual ones if you want.


--graph-blank-char   Defaults to -
--graph-filled-char  Defaults to #

--spacer-size  The number of spaces between the displayed stats
--total-width  Define this if you want the output padded to a specific
               length; it's centered by default if so
--align-left   Use with --total-width if you don't want centered output
--align-right  Use with --total-width if you don't want centered output

--use-newline-for-spacer  Puts newlines instead of spaces between the stats
--align-labels            Useful with --use-newline-for-spacer to make the
                          labels ("CPU", "Swap", "RX", etc) and graphs line up
                          vertically.   Preset one-per-line includes this.

--spaces-after-foo: these all default to --spacer-size (or to a newline if
--use-newline-for-spacer is set) but can be overridden individually.  I usually
only use these if the length of my output is one or two chars shorter than I
want my --total-width to be; in that case, I just pick some random one of these
and add one or two to it.


For the network data rate graphs to make sense, they need to know what the
maximum possible value is.  For example, my cable connection can transmit
at 32KB per second max, and receive at about 400KB per second max.  The unit
is whatever you specify for --rx-unit or --tx-unit.

--max-rx-value		Some number
--max-tx-value		Some (probably different) number
--rx-unit		KB (default), Kb, MB, Mb, B, or b  (B=bytes, b=bits)
--tx-unit		KB (default), Kb, MB, Mb, B, or b  (B=bytes, b=bits)
--net-decimal-places	Defaults to zero

--date-format     Defaults to "%a %b %d / %H:%M"   see man strftime
--load-max-value  Defaults to 8



The terminals that I use (aterm, xterm) don't seem to let you turn off the 
displaying of the cursor.  And in order to make the output be the full width
of your screen AND on a single line, the cursor apparently needs to overlap
the last character in the line.  aterm lets me use -cr to define the color of
the cursor, and since the cursor is just a hollow rectangle when the terminal
doesn't have focus, I can just set the cursor color the same as the background
color.  The result is that a few pixels of the final character on the line get
overwritten by the edge of the cursor.  It's a very small issue and isn't even
noticable on most characters, but it's sort of annoying knowing I can't just
turn off the cursor.  Of course the workaround is to simply make the final char
in the line be a space or a period or something.



For help, etc:
Anthony DiSante:


antsysmon is a perl script.  Download antsysmon.txt and rename it to just antsysmon with no extension.  Then you probably want to do something like this:

mv antsysmon /usr/bin/
chmod a+x /usr/bin/antsysmon

I put this into my ~/.fvwm/.fvwm2rc file to get what you see in those screenshots above:

AddToFunc StartFunction
+ I PipeRead "echo Module FvwmButtons -g $$(($[vp.width]))x14+0-0 FvwmButtonsAnt"

Style FvwmButtonsAnt     NoTitle, WindowListSkip, CirculateSkip, Sticky, BorderWidth 0
Style FvwmButtonsAnt     NoHandles, StaysOnTop, NeverFocus

Colorset 20 fg white, bg black
DestroyModuleConfig FvwmButtonsAnt: *
*FvwmButtonsAnt: Colorset 20
*FvwmButtonsAnt: Frame 0
*FvwmButtonsAnt: Padding 0 0
*FvwmButtonsAnt: Rows 1
*FvwmButtonsAnt: Columns 1
*FvwmButtonsAnt: (1x1, Frame 0, Swallow "antsysmon" `Exec aterm -fg white -bg black \
 -cr black -bw 0 -sl 0 +sb -fn 6x10 -title antsysmon -e antsysmon --preset ant-full`)

You can get my whole Fvwm config file here.