Gizmo Server Tools

A collection of scripts that can be used to collect and plot statistics to efficiently monitor the server health and status on the web using RRDTool. Largely inspired by scripts from Martin Pot (www.martybugs.net).


Introduction/Description

By "health and status" above, I mean health data from sensors and status information from the kernel. The following statistics can be collected and plotted:

Download and Demonstration

SourceForge Project Page
This is where you will find the source code releases to download and other things like news, forums, etc. Note that since this is a set of Perl CGI scripts, there's no binary necessary (the source code is what you want).

Snapshot of Version 2.0 Working Setup
This time, I created the snapshot using HTTRACK. This renders the pages and fixes the links automatically so the product is a static version of the set of dynamic pages. This way we save SourceForge CPU time, at the cost of a little disk space. This snapshot demonstrates the organization of the new recording and plotting scripts (although the example is static) and the plots generated by GNUPLOT of a waveform which is ammended to each day for the year. The waveform includes three trends: daytime highs, average for the day, and (following) overnight lows.

Snapshot of Version 1.2 Example Working Setup
This is a snapshot of the web CGI scripts and images generated by RRDTool. I just copied it over to the SourceForge server from the /var/www/rrdtool directory on my Mini-ITX file server. The code has been modified so that the pages display correctly on the SourceForge server. I will eventually do an HTML-only version of this example.

Update: I've finally replaced the CGI scripts in the example with a static version generated by HTTRACK.

Philosophy

Version 2

The primary value is to save the server time on a regular basis so that the server is more "available" (i.e.: responsive) for other tasks. To accomplish this, the new strategy, based on an example from the LM_SENSORS project, is as follows:

Version 1

I learned quickly that running RRDTool every five minutes can really slow down already slow machines. I had to come up with a few ways of making the best of this:

History

Version 0.2.2

Shell update script has been replaced with a perl script which also includes all the other Perl routines.

Every routine where a system access like `cat ...` or `grep ...` occured has been replaced with a call to the Sys::Statistics::Linux library, available from CPAN, for compatibility between Linux versions and the robustness of these codes. This also removed the dependency on the SYSSTAT package.

These revisions have cut the time requirements down to about a quarter of what they were before.

On a 1GHz machine, the 0.2.2 script has the following nominal time:

real    0m0.974s
user    0m0.250s
sys     0m0.120s

And with four digitemp temperature sensors:

real    0m11.350s
user    0m0.256s
sys     0m0.141s

Note the user and sys times, since the real time doesn't affect availability. This is an improvement of over 76%. Note that this does not include the LM_SENSORS script, this has to be run seperately.

For completeness, here is the time for the LM_SENSORS script:

real    0m0.181s
user    0m0.053s
sys     0m0.127s

Version 0.2.0

Replaced chronological ("cron") graph updates with on-demand RRDCGI scripts. The graphs have been re-organized to include the data from the LM_SENSORS RRD. This means that the update time is now the worst-case time (other than the first-run time).

Typical version 0.2.0 run-time:

real    0m12.525s
user    0m0.890s
sys     0m0.805s

Version 0.0.2

This was my first experience with Perl, and the script went up on Source Forge. It did perform well on my configuration, but it needed improvements to performance and simplicity of configuration.

To Do List

Helping Out

Any help on this project would be appreciated. Read over the to-do list before you get started. I've outlined here everything that needs to be done. You can shoot me an e-mail at:

signature

The address here was previously outdated (too much spam to keep checking it). The image should deter robots.

Thanks

In the world of free software, it is understood that reinventing the wheel is a hinderance to development. I certainly couldn't have done all this alone, so here I give due credit:


Valid HTML 4.01 Strict Created by Ryan Helinski