Startup and Initialization


Much of this is really intended for those who want to learn more about how collectl initializes and don't feel the urge to weigh through the code. Quite frankly I don't blame you!

When you run the collectl command, it goes through a number of initialization steps most of which are not being documented here. Rather as initialization internals becomes more important or identified as areas people want to here more about, now I'll have a place to put it.


Collectl basically consists to 2 main perl scripts, the first is collectl itself, whose main job is reading data from /proc and writing it to a raw file. The functions for generating formatted output live in When collectl is installed from an rpm, debian package or one has simply executed INSTALL, is copied to /usr/share/collectl. This is also the directory collectl looks in for --include and --export modules.

However, there are some cases in which one wishes to install collectl in a non-standard location by modifying the INSTALL script or they're modifying collectl and want to test those changes without disturbing the installed copy. To accomodate this feature, collectl actually looks in a couple of places to locate, based on the directory collectl itself is run from so let's call that $bindir:

Finding collectl.conf

A similar mechanism exists for opening/reading the collectl.conf file which among other things sets the parameters used by collectl run running as a Daemon. This search path is also based on $bindir.
updated April 29, 2014