Running the Programs

In this section, each script's functions and arguments are discussed. There is a set of common arguments that some of the scripts accept, and of course, each has its own idiosyncrasies, too.

The following arguments are common to most of the components of Cricket.

-logLevel

Default value: info (except grapher.cgi, where it defaults to warn)

The possible values are "error", "warn", "info", or "debug". Each setting includes the output created by any of the preceding settings. All diagnostic output goes to the standard error stream.

-base

Default value: $HOME/cricket-config

You can use this setting to use a different config tree. Experience shows, however, that it's simplest to just accept the defaults and install Cricket in an account of its own.

Here's a brief description of each program, and what arguments it takes.

collector

Collector is the script that runs every five minutes from cron in order to traverse the config tree, fetch data, and enter it into the RRD files. It's also used interactively to test configurations, and to convert old-style RRD files to RRD 1.x.x files.

The collector will process only the subtrees listed on the command line, unless there are none, in which case it will process the entire config tree.

Except during testing, collector is usually run from collect-subtrees, which takes care of creating the huge command lines collector sometimes needs, and does other housekeeping jobs. When testing a new subtree of the config-tree, you can use a command like "$HOME/cricket/collector -logLevel debug /new-tree". Once you are certain the subtree is functioning correctly, you can add it to the collect-subtrees config file, and rely on collect-subtrees to run the collector for you.

The collector will always run in two stages: collecting the data and checking thresholds for monitoring. If you for some reason do not need or want the threshold monitoring, you can specify the -skipMonitor option. Good reasons not to run this second phase include:

grapher.cgi

Accepts common arguments.

The grapher is almost never run from the command line, so options parsing is basically a moot point. The CGI script should get run by the web server automatically in response to accesses to files that end in CGI. Consult your web server documentation to find out how to make it work like this.

Because it's not generally possible to control the command line of grapher.cgi, it's critical that it either defaults to the correct base directory, or that it has the base directory hardcoded internally to it. The default base directory is $HOME/cricket-config. However, $HOME will only be set right if Cricket can guess it's username from it's URL. If there's any doubt, you should hard code the base directory by editing the first few lines of grapher.cgi.

configure

Accepts no arguments at this time.

This is basically a placeholder for when Cricket is more complicated (say it ain't so!) and requires an autoconf-generated configure script. At this point, it can point all the Cricket scripts at your Perl install, which is very helpful for sites which do not have Perl installed in a standard location.

Cricket version 1.0.5, released 2004-03-28.

Copyright (C) 1998-2000 Jeff Allen. Cricket is released under the GNU General Public License.