--- projects/cms/source/reports/rrdgraphing/watch.pl 2002/05/21 15:01:43 1.3 +++ projects/cms/source/reports/rrdgraphing/watch.pl 2003/03/10 11:34:43 1.6 @@ -2,6 +2,7 @@ # # i-scream central monitoring system +# http://www.i-scream.org.uk # Copyright (C) 2000-2002 i-scream # # This program is free software; you can redistribute it and/or @@ -27,10 +28,10 @@ # the i-scream server and collecting data. # # $Author: tdb $ -# $Id: watch.pl,v 1.3 2002/05/21 15:01:43 tdb Exp $ +# $Id: watch.pl,v 1.6 2003/03/10 11:34:43 tdb Exp $ #------------------------------------------------------------ -my($version) = '$Id: watch.pl,v 1.3 2002/05/21 15:01:43 tdb Exp $'; +my($version) = '$Id: watch.pl,v 1.6 2003/03/10 11:34:43 tdb Exp $'; $| = 1; @@ -287,18 +288,49 @@ sub processdata() { @data = ( "packet.users.count:count:GAUGE", ); &updaterrd($machine, "users", $date, $rrdstep, \%xmlhash, @data); - + + # paging + @data = ( "packet.pages.pageins:pageins:GAUGE", + "packet.pages.pageouts:pageouts:GAUGE", + ); + &updaterrd($machine, "paging", $date, $rrdstep, \%xmlhash, @data); + # disk my($i) = 0; while(defined $xmlhash{"packet.disk.p$i.attributes.mount"}) { my($mount) = $xmlhash{"packet.disk.p$i.attributes.mount"}; $mount =~ s/_/$hex_underscore/g; $mount =~ s/\//$hex_slash/g; - @data = ( "packet.disk.p$i.attributes.kbytes:kbytes:GAUGE", + @data = ( "packet.disk.p$i.attributes.total:total:GAUGE", "packet.disk.p$i.attributes.used:used:GAUGE", + "packet.disk.p$i.attributes.totalinodes:totalinodes:GAUGE", + "packet.disk.p$i.attributes.freeinodes:freeinodes:GAUGE", ); &updaterrd($machine, "disk-$mount", $date, $rrdstep, \%xmlhash, @data); ++$i; + } + + # diskio + $i = 0; + while(defined $xmlhash{"packet.diskio.p$i.attributes.name"}) { + my($name) = $xmlhash{"packet.diskio.p$i.attributes.name"}; + @data = ( "packet.diskio.p$i.attributes.rbytes:rbytes:GAUGE", + "packet.diskio.p$i.attributes.wbytes:wbytes:GAUGE", + ); + &updaterrd($machine, "diskio-$name", $date, $rrdstep, \%xmlhash, @data); + ++$i + } + + # net + $i = 0; + while(defined $xmlhash{"packet.net.p$i.attributes.name"}) { + my($name) = $xmlhash{"packet.net.p$i.attributes.name"}; + @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); + ++$i } }