How to Use Cricket

  1. Install Cricket.
  2. Configure devices.
  3. Compile the database.
  4. Collect the data.
  5. View the graphs.

Install Cricket

Obviously, this only needs to be done once.

Configure a device

Each directory in ~cricket/cricket-config contains two files, usually called Defaults and Targets. See ~cricket/cricket-config/unixhosts/filers/ for an example of a locally-written device tree.

Make sure that the files are group- and world-readable, and please use RCS to keep track of any files you edit.

You can set up events associated with specific targets, e.g., to mark configuration changes which would affect performance. For each event, cricket draws a vertical line and puts a short note in the legend. An example is ~cricket/cricket-config/filers/Targets: see how we've marked the moving of data off overloaded chinchin onto cheers and prost. Note that because of a bug in the current version, the event names must be all lowercase.

Compile the database

After editing any configuration files, you must recompile the database:
oregano# su - cricket
oregano:cricket$ ~/cricket/compile
Watch for errors. Common ones have to do with files having the wrong protections.

Collect the data

Once the database has been compiled, see if you can collect data. Substitute the name of your tree in this command:
oregano:cricket$ ~/cricket/collector /tree
Watch for errors. If you change the type or number of datasources in your config, you will probably need to remove ~cricket/cricket-data/tree and collect again.

If you have added a new tree and the test is successful, you must edit ~cricket/cricket/subtree-sets and add your tree. Make sure to leave the file group- and world-readable so cricket can see it.

The collect-subtrees script has been renamed cricketd and it runs as a daemon instead of a cron job. It is started by /etc/init.d/cricketd

View the graphs

That's an easy one: just run the grapher.cgi script.

Remember that if you change the config files you have to compile again (and possibly remove old data if the datasources changed). The grapher is configured to cache graphics files in /scratch. If your changes don't show up right away, try deleting /scratch/*.png and reloading the page.

Cricket offers you an assortment of graph types, e.g., hourly, daily, weekly, monthly. You can also generate your own graph by running mini-graph.cgi. To find out how cricket does it, view an "image" in your browser (e.g., in Netscape, click on the graph, and select "Copy this image" from the menu). The URL will show you how the graph is generated. The range parameter is the number of seconds to display on the graph, e.g., for the daily graph it's 151200 seconds, or 7 hours. Keep in mind that there's a fixed amount of collected data, so at some point the graphs will get blocky (you can't just click on "enhance" like they do in the movies :-)

Last updated: Mar 7 2005