I am trying to monitor my Radius server using MRTG, but seem to be having
some problems. This may be beyond the scope of this mailing list, but and
help would be appreciated.
When I run Stephen Roderick's perl script nothing happens, my computer hangs
on the program.
#!/usr/local/bin/perl
$total = 0;
$accttotal = 0;
open(FD, "/usr/local/bin/snmpwalk host community
.1.3.6.1.3.79.1.1.1.6.1.4 |") or die;
while()
{
$total += $1 if (/.* = (\d+)/);
}
close(FD);
open(FD, "/usr/local/bin/snmpwalk host community
.1.3.6.1.3.79.1.1.1.6.1.12 |") or die;
while()
{
$accttotal += $1 if (/.* = (\d+)/);
}
close(FD);
$total *= 8;
$accttotal *= 8;
open(FD, ">/stats/radius.stats");
print FD "$total\n$total\n";
close(FD);
open(FD, ">/stats/radiusacct.stats");
print FD "$accttotal\n$accttotal\n";
close(FD);
exit 0;
I know SNMP is working now because:
# snmpget 216.94.40.10 public .1.3.6.1.3.79.1.1.1.6.1.4
79.1.1.1.6.1.4.0 = 5399
Any ideas?
Greg Kornatowsky
ZooLink
===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.