Patches to SARGE


SARGE was written by Ed Finch. It is a set of Perl scripts that gather SAR data from a number of remote systems and produce a set of web pages showing the data in graph form.

Later versions of SARGE were commercialised by X-Sarte. The last free release of SARGE (under the Perl Artistic License) was v0.53.

The following patches to the main utility scripts provide some minor enchancements that may be desirable. The patches can be applied using the standard GNU Patch utility. They were developed to meet local needs and may require editing for use on other sites.

sarge

  • Write graphs in PNG format, to avoid GIF patent issues with GD library.
  • Use Berkeley DB instead of NDBM for SAR data files (requires Perl DB_File module and manual conversion). This improves speed and reduces disk space requirements.
  • Reduce minimum y scale for disk graphs, to make small values more visible.
  • Remove all warnings generated by Perl 5.8+.

private

  • Use Berkeley DB for SAR data files.
  • Use Secure Shell (ssh, from hardcoded path) instead of looking for rsh.
  • Double maximum allowed free swap values for modern large systems.
  • Disable host pinging to avoid firewall issues.
  • Remove all warnings generated by Perl 5.8+.
  • Update, 2007-04-20: Handle four-digit years in SAR date stamps for Solaris 10.

webgen

  • PNG compatibility changes.
  • Fix find_host_graphs() to only look for current graph files (today's).

ndbmutil

  • Clean option also removes entries for disk averages ("YYMMDDAverage").
  • -n option to write out fresh copy of NDBM file. This can be used to shrink a cleaned file (NDBM files do not reduce in size after removing entries). Optional overwriting of original and conversion to Berkeley DB.
  • Handling of Berkeley DB data files.

Data file conversion

Before using the patched versions of sarge and private, you must convert any existing data files to Berkeley DB format:

  1. Stop all SARGE activity (i.e. disable cron jobs).
  2. Install the patched SARGE utilities.
  3. Run the following command on each existing data file (this can be scripted):
    $ ndbmutil -n -r -db datafile
    
    (Do not supply the NDBM pag/dir extension to the filename.) This will write a new file (without removing the original NDBM files) called file.db.
  4. Re-enable SARGE jobs.

Download

sarge_v0.53b-patch.tgz (patches only)
sarge_v0.53.tar.gz (original source)

Download and unpack the above archive. After applying each patch, check and update the path for the perl and (where used) the ssh command in each patched script.

Support

These patches are offered under the same license terms as the original SARGE distribution. No support is offered for the original SARGE code. If you have any questions or concerns, please mail me.

Hints for running SARGE

  • It's briefly mentioned in the README, but you should use ndbmutil to clean each data file of entries over 31 days old regularly (unless you're using the same files for other purposes), otherwise they grow without bound and slow everything down.
  • webgen is run in the top level SARGE directory with the following arguments:
    $ webgen full_path_to_sarge_bin_dir web_document_root
    
  • SARGE generates crontab entries to run the scripts regularly. You may wish to manually edit the time schedules for these entries to stagger the runs for each host group and avoid swamping the collection host.

Update, 2005-12

I have received the following sad news from Shawn Ferry:

Ed Finch took his own life ~4 years ago while we were both at NewsReal.

Speaking only for myself,  I think he would have been pleased by
further enhancements to SARGE.

This work is respectfully dedicated to Ed Finch's memory.

Update, 2007-04-20

I've made a minor update to the patch for private, to handle the modified SAR datestamps in Solaris 10.

Update, 2009-03-05

If you want similar functionality to SARGE but with more stats, finer resolution and an RRD backend, consider a combination of Collectd and drraw.

Posted by ajr at 10th Jan 2005 4:00 PM |
Last updated at 28 February 2012 10:13 AM | Reply