Running As A Service

Assuming collectl has been installed from the rpm kit, it has been configured to be run as a service, but disabled from automatically starting at boot. To enable it, simply chkconfig collectl on, noting by default collectl is configured to collect most data. To see what the specific subsystems are, execute collectl -V and look at the daemon default values for -s. It is also configured to write all data it to a compressed text file in /var/log/collectl, which was created when the kit was installed. To verify collectl will properly run as a service, execute command service collectl start and examine the log file in /var/log/collectl for the startup (and hopefully no termination) messages as well as the appearance of either a raw or raw.gz data file in that same directory. Note that since the output is buffered, the data file will probably have a length of 0 until the flush interval, which is currently set to 60 seconds, passed.

In order to write its output as a compressed file, the perl Compress module must be present as it is with newer perl distributions. If it is not already there you should install it, otherwise you will get messages warning you compression is not installed. You can explicitly disable these messages by telling collectl not to compress via -oz.

To change any behaviors of the daemon such as the flush interval, output file location, etc., simply change the DaemonCommand parameter in /etc/collectl.conf which specifies the actual command string collectl is passed at startup. Use care in setting this string as incorrect settings may cause collectl to abnormally exit in which case you should examine the log file for messages.