Colplot

Introduction

Whether you instruct collectl to generate plot formatted output at the time of data collection or afterwards by playing back a raw file and converting it to a plottable one, you now have to decide how to generate your actual plots and there are actually several choices: At its core, colplot is nothing more than a script that has intimate knowledge of collectl plot file and directory format. Based on the types of plots being requested and some basic formatting options, it will build the necessary gnuplot commands and automatically run them for you.

Colplot can be run either through a web-based interface or a command line. As this introduction is not intended to be a User's Guide, see the colplot man page to identify which command line switches map to which web-based options. Also note that to produce plots on your terminal in command mode you must be running on a system that supports X terminals or windows. No, that is not a typo. Colplot does run on PCs. Also note if you direct colplot to write your plots to a file X is not required.

It should also be noted that colplot should be able to run with any browser on any operating system as long as perl and gnuplot are also installed. However it has only been testing on linux and windows. Furthermore, installing the RPM has only been tested with the Apache web server and so there will probably be additional work required to get it installed, configured and running with other servers.

Using

When you browse to a server running colplot you will see the following:

By design colplot will generate its plot(s) against all files in the selected directory that match the selected timeframe and optional filename match strings. In the example below, which uses the sample plot files distributed with colplot, you can see the results of selecting only files with client in their name and choosing to plot only CPU and Network data:

When generating plots for multiple systems, colplot will actually format the output as if in a spreadsheet where each cell is a plot and the rows/columns are organized by system names and plot types,. You can change the organization of the cells with the Display drop-down box. In the following example, 2 systems have been selected by choosing system names that match client or server, setting the plot widths to something narrower, setting the x-axis time scale to 5 minutes and removing the legends for a more compact display:

To learn more about colplot read the man page, click on the Help button at the top of the display and don't forget to read the FAQ. You should also click on Help next to the Plot By Name(s) field to see a list of all the available plots. Don't forget to experiment with the sample files in colplot's default directory, noting you can later change the default location in colplot.conf.

Real-Time Display
One nifty feature of colplot is its ability to display graphics in real-time, which is controlled by 2 fields at the top of the display:

The trick to make this all work is to have collectl write data in uncompressed plot format and continuously flush its buffers so the latest sample is always on disk (collectl -P -oz -F0 etc...). Now, when colplot displays its plots it will display the last n-minutes of data at the specified refresh interval. While you can set a pretty small interval such as 5 or 10 seconds, the redisplay of the graphics can be visually annoying and there is more processing involved. Intervals between 15 and 60 seconds tend to be easier on the eyes and CPU.

TIPS
  • having multiple systems write to the same nfs mounted directory, allows you to monitor them at the same time
  • if you use narrow plots without legends, you can fit 5 or more per row resulting in a very readable dense display

Installation

If you're installing on a linux system running Apache there shouldn't be anything special to do as colplot will do the right thing to allow someone to browse to http://systemname/colplot. There are a number of pieces of installation magic that makes all this work, some or all of which you may have to manually do if running in a different environment: I did the following to make colplot run on IIS on Vista (after installing perl and gnuplot), noting I wasn't really interested in trying to get as fancy as I did with Apache. To run it with the following settings you will need to specify a URL of http://systemname/colplot.pl: It is not an objective to document how to get colplot running in other environments, especially since I don't even have access to them. Therefore it will have to become the responsibility of the community to send me instructions, which I'll be happy to post along with YOUR email addresses so you can support your instructions if something goes wrong.

updated Feb 22, 2011