Re: Graphing System Load MRTG

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



> 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.

/home/../domains/../public_html/systemload/mrtg.cfg

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:
LegendO[index]:
YLegend[index]: Load
XSize[index]: 600
YSize[index]: 150

/scripts/sysload.pl

#!/usr/bin/perl

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.
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux