Usage

SysUsage consist in two perl scripts, sysusage and sysusagegraph. Once you have correctly installed and configured SysUsage the best way to execute them is by cron job.

sysusage

The script sysusage is responsible of collecting system informations at a given interval and store them into rrdtool database files.

As it is very fast you can set running interval time to 1 minute. This is the default pooling interval used in configuration and graph reports. If you change this interval you must also change it in the configuration file otherwise your graph will be false. See the INTERVAL configuration directive.

Here is how I use it with a default installation:

        */1 * * * * /usr/local/sysusage/bin/sysusage > /dev/null 2>&1

rsysusage

This script do the same things as the sysusage Perl script but instead of storing collected datas on file it will dump them to the standard output. This script is used instead of the sysusage Perl script by a ssh call from a central server where the local sysusage will store the statistics retrieved from multiple servers.

        /usr/local/sysusage/bin/rsysusage -r remote_hostname

Where 'remote_hostname' is the hostname given in the [REMOTE ...] configuration section.

sysusagegraph or sysusagejqgraph

The perl script sysusagegraph is used to draw PNG graphs and write HTML file. As he knows the pooling interval given in the configuration file it can be run at any time. I used to run it each five minutes but you can run it each hours or more this is the same.

        */5 * * * * /usr/local/sysusage/bin/sysusagegraph > /dev/null 2>&1

Since release v4.0 of SysUsage there's a JQuery plotting replacement of rrdGraph that only write HTML files with all javascript code to allow the client browser to draw the graphs. To enable this feature you just have to use sysusagejqgrpah instead.

        */5 * * * * /usr/local/sysusage/bin/sysusagejqgraph > /dev/null 2>&1

There's some more resources javascript libraries and CSS files to install. The SysUsage installer will do the job for you. This remove the requirement of the GD, GD::Graph and GD::Graph3D Perl modules.

sysusage.cfg

If you have change the default installation path (/usr/local/sysusage) you may need to give these scripts the path to the configuration file as command line argument using -c option. To know what arguments can be passed use option -h or --help.

Note that since version 3.0 the default configuration path in these scripts is set during installation. So you may not need anymore to edit these scripts or give the path of the configuration file as command line argument.

See CONFIGURATION chapter for more information on howto configure your system monitoring.

Daemon mode

Crond is good for scheduling but not under the minute. If you want to monitor your system within an interval under the minute you may want to run sysusage in daemon mode. To do that, just change the INTERVAL to the desired timer in the configuration file and the DAEMON directive to 1.

Debug mode

Some time things don't appear as you wanted. The best way to see what's going wrong is to run sysusage in debug mode. This mode allow you to see all values extracted from sar and other tools. Use the --debug option for that, this mode prevent sysusage to store data in the rrdfiles. Command:

        /usr/local/sysusage/bin/sysusage --debug

Please, run this command and check the result before sending bug report.

Output

Once sysusage and sysusagegraph are running since some cycles, run your favorite browser and take a look at the output directory. By default:

        http://my.server.dom/sysusage/

If you have special URI and/or port remember to modify the URL configuration directive without that the web interface will not works.


Copyright (c) 2003-2015 Gilles Darold - All rights reserved. (GPL v3).

Help support
SysUsage!