webwatchd - a daemon to post cluster info to the web


Synopsis:

usage: webwatchd [options]
     -f configfile       use alternate config file
     -p port             use alternate port for procstatd
     -u freq             update frequency for the web page
     -v                  verbose output
     -V                  really verbose output


Description:
webwatchd watches a set of procstatd's running on the cluster and reports the data to a web page. This web page is updated at a fixed rate, thereby limiting the overhead of the monitoring system. Thus, re-loading the web page will NOT force a re-collection of remote data. The sysadmin should select a suitable rate to balance this instrumentation overhead with the need for up-to-date statistics so users can load balance their own jobs.

webwatchd is a Perl script which uses the IO::Socket interface to ping the remote procstatd's for information. It uses a time-out feature proposed by Lincoln Stein in his book "Network Programming in Perl" - this way, hung or busy machines should not hang webwatchd.


Options:
The -f option allows the use of an alternate configuration file but note this is inherently dangerous. If you do not have a valid list of machines and valid port numbers, most of the cluster utilities will not function.

The -p and -u options are just conveniences (and somewhat dangerous as mentioned above). It is always best to edit the config file and THEN run webwatchd. Note also that you can edit the config file while webwatchd is running and then issue SIGUSR2 to force webwatchd to re-load the new file. This is the preferred way to add or remove machines, re-set the update frequency, etc.


General Usage:
I generally run webwatchd as a user-level process with the following command line:

   % webwatchd >& wwd.log &
Note that webwatchd does not generally produce any output, but it can be helpful to capture any error output into a log file for later analysis.


Configuration File:
There are several basic system configuration options that you may want to set, some for security reasons, others for more robustness in connecting to remote machines. Note that the top part of the file should not be tampered with -- the "package", "use", "@ISA", and "@EXPORT" lines must be there in order for Perl to import this into the herdtools programs.

$heartbeat=300;
sets the refresh rate for updating the web page information (in seconds)
$weblocation="/home/www";
sets the base directory for where to put the output files; two files will be created in $weblocation: cluster.html and cluster.data
$webtitle="Main title";
sets the main title for the web page (displayed at the top of the page)
$webimage1="foo.jpg";
sets the left image in the top title area
$webimage2="bar.jpg";
sets the right image in the top title area
$meterimage="vu_";
sets the base filename for the meter images; a 2 or 3 digit number will be appended to this; NOTE that it is assumed to have a ".jpg" extension
$meterround=10;
sets the rounding criteria for the images; the numbers will indicate a percentage from 0 to 100, rounded to this value
@linksize = (2,2);
for the web link area underneath the title area, this sets the table configuration for the links
@webtext = ( "abc", "def", "ghi", "jkl" );
sets the text to be displayed for the web links
@weblink = ( "url_abc", "url_def", "url_ghi", "url_jkl" );
sets the URLs for the web links; could (should?) be fully qualified URLs complete with the "http:" stuff
@motdtext = ( "line1", "line2", "line3" );
sets the cluster message of the day, displayed under the web link area
@outputlist = ( "load1:1", "mem_used:1" );
sets the output stats to print in the table (in addition to the CPU and memory usage meters); options are shown on the procstatd page
$linkcolor="blue";
sets the color for web links
$bkgdcolor="white";
sets the background color for the page
$textcolor="black";
sets the text color for the page
$motdcolor="red";
sets the color to use to highlight the MOTD message
Note that the last line of the program should be "1;" since this is required for Perl modules (this forces the module to return a "true" value to Perl, indicating that it loaded without errors).

If you want to change the layout of the page any further, you'll have to hack into the webwatchd source code and modify it there.


RCSID $Id: webwatchd.html,v 1.2 2002/03/12 14:11:18 jpormann Exp $