--- projects/cms/source/reports/rrdgraphing/watch.pl 2003/03/10 11:34:43 1.6 +++ projects/cms/source/reports/rrdgraphing/watch.pl 2004/08/01 10:40:32 1.8 @@ -2,7 +2,7 @@ # # i-scream central monitoring system -# http://www.i-scream.org.uk +# http://www.i-scream.org # Copyright (C) 2000-2002 i-scream # # This program is free software; you can redistribute it and/or @@ -22,17 +22,21 @@ # ----------------------------------------------------------- # i-scream graph generation scripts -# http://www.i-scream.org.uk +# http://www.i-scream.org # # Generates rrd databases for i-scream data by connecting to # the i-scream server and collecting data. # # $Author: tdb $ -# $Id: watch.pl,v 1.6 2003/03/10 11:34:43 tdb Exp $ +# $Id: watch.pl,v 1.8 2004/08/01 10:40:32 tdb Exp $ #------------------------------------------------------------ -my($version) = '$Id: watch.pl,v 1.6 2003/03/10 11:34:43 tdb Exp $'; +BEGIN { + push (@INC, "/usr/local/packages/rrdtool/lib/perl5/site_perl/5.8.2/sun4-solaris"); +} +my($version) = '$Id: watch.pl,v 1.8 2004/08/01 10:40:32 tdb Exp $'; + $| = 1; use strict; @@ -259,6 +263,7 @@ sub processdata() { # mem @data = ( "packet.memory.free:free:GAUGE", "packet.memory.total:total:GAUGE", + "packet.memory.cache:cache:GAUGE", ); &updaterrd($machine, "mem", $date, $rrdstep, \%xmlhash, @data); @@ -328,8 +333,18 @@ sub processdata() { @data = ( "packet.net.p$i.attributes.rx:rx:GAUGE", "packet.net.p$i.attributes.tx:tx:GAUGE", ); - &updaterrd($machine, "net-$name", $date, $rrdstep, \%xmlhash, - @data); + &updaterrd($machine, "net-$name", $date, $rrdstep, \%xmlhash, @data); + ++$i + } + + # mailq + $i = 0; + while(defined $xmlhash{"packet.mailq.p$i.attributes.name"}) { + my($name) = $xmlhash{"packet.mailq.p$i.attributes.name"}; + $name =~ s/\s+//g; + @data = ( "packet.mailq.p$i.attributes.size:size:GAUGE", + ); + &updaterrd($machine, "mailq-$name", $date, $rrdstep, \%xmlhash, @data); ++$i } }