Logging

Overview

Collectl supports 2 very basic data logging mechanisms. In the first case it will log the data as read from /proc to a file with the extension raw or raw.gz, depending on whether or not the perl module Compress::Zlib.pm has been installed. If not, one can always install compression at a later time and collectl will happily use it the next time it is started. One useful property of raw files is that one can play them back using different switches/options for display or generation of plottable files from them.

The second major form of logging is writing data to one or more tabularized, also known as plottable files, which have the extension tab for data associated with the core subsystems or one of several other files for the detail data associated with devices like cpus, disks, networks, etc.

The biggest benefit of raw files is they are very lightweight to create in that no additional processing is performed on the data. Since they contain the unaltered /proc data from which collectl derives its numbers to report, it is always possible to go back and look at the orginal data. In some cases, there is data in the raw file that was easier to collect than ignore and in these situations one can actually see more data than is normally available. In fact the --grep switch is available for looking for data in the raw files and prefacing them with timestamps, something the standard grep command cannot do.

As their type implies, plottable files have their data in a form that is ready to be plotted with tools like gnuplot or immediately loadable into a spreadsheet like OpenOffice or Excel or any other tool that can read space-separated data. When generated by collectl while it is running, this data can be read while it is being generated making it possible