[CentOS] Graphing System Load MRTG

Tue Dec 21 22:55:41 UTC 2010
Matt <lm7812 at gmail.com>

> Cacti is in the epel repository, so if you have that configured it is
> just 'yum install cacti' and you are pretty much done.

This box is CentOS 4 and has some web hosting software on it.  Due to
exclusions its not that easy. ;-(

I manged to make this work with just plain MRTG which was on it already.


WorkDir: /home/../domains/../public_html/systemload/
Title[index]: System Load
PageTop[index]: <H1>Load</H1>
Target[index]: `/scripts/sysload.pl`
MaxBytes[index]: 300
Options[index]: growright,unknaszero,nopercent,gauge,noinfo
LegendI[index]: Load:
YLegend[index]: Load
XSize[index]: 600
YSize[index]: 150



my $load = `cut -d" " -f2 /proc/loadavg`;
chomp $load;
print "$load\n";
print "$load\n";

May not be perfect but it works.  May needed to be tweaked a bit yet too.