LoadAvg polls your system information and stores this data in log files that it uses to create and display its charts and graphs. Once you have installed LoadAvg you will need to set up logging so it can capture this information.

Logging is currently done via a simple script called logger.php. For it to collect data in a timely manner you will need to set up a cron script to call the logger every 6 minutes, this critical for loadavg to function.

To do this you will need to edit your crontab. Use “sudo crontab -e” (or your control panel) to edit the crontab as root and insert a line something like this:

*/6 * * * * /PATH/TO/php -q /PATH/TO/logger.php /dev/null 2>1

Edit the paths to php and paths to logger.php as necessary. Do NOT attempt to change the timing, it simply will not work correctly.

Finding the paths

If you are having trouble finding the paths, you and use the commands “whereis” and “pwd” to find out where loadavg is installed and where php is installed.

To find out where loadavg is installed, navigate to the directory where logger.php is located and type:

pwd

To find out where php is installed, then simply type

whereis php

For eg, on our system here it is:


*/6 * * * * /usr/bin/php -q /usr/share/loadavg/logger.php /dev/null 2>1

Post installation

The logger.php must run 3 times before there is enough data to start producing charts. In 20 minutes or so, check the index.php page in your web browser.

Note that the loadavg graphs will not display quite right during your first day. Once the second day is started the graphs will be correct. This is a design issue that will eventually be fixed.