X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fmrtg.pl;h=dfc0fcb5050661f81e0827cec76066ed19231220;hb=e8fe72d833414c4bb7f017ed0b62167aa5ac593d;hp=05d426e26266bf2174a08582b4a98b58154e0cee;hpb=c88a557d27612adc84d786427b15c4f0fb1d6ee4;p=spider.git diff --git a/cmd/mrtg.pl b/cmd/mrtg.pl index 05d426e2..dfc0fcb5 100644 --- a/cmd/mrtg.pl +++ b/cmd/mrtg.pl @@ -36,6 +36,20 @@ $want{nomrtg} = 1 if $want{cfgonly} || $want{test}; return (1, "MRTG not installed") unless $want{nomrtg} || -e '/usr/bin/mrtg' || -e '/usr/local/bin/mrtg'; my $mc = new Mrtg or return (1, "cannot initialise Mrtg $!"); + +# do Msg totals +$mc->cfgprint('msg', [], 64000, + "Data in and out of $main::mycall", + 'Bits / Sec', 'Bytes In', 'Bytes Out') unless $want{dataonly}; +$mc->data('msg', $Msg::total_in, $Msg::total_out, "Data in and out of $main::mycall") unless $want{cfgonly}; + +# do AGW stats if they apply +if ($want{agw}) { + $mc->cfgprint('agw', [], 64000, + "AGW Data in and out of $main::mycall", + 'Bits / Sec', 'Bytes In', 'Bytes Out') unless $want{dataonly}; + $mc->data('agw', $AGWMsg::total_in, $AGWMsg::total_out, "AGW Data in and out of $main::mycall") unless $want{cfgonly}; +} # do the users and nodes my $users = DXChannel::get_all_users();