Hi there,
I found this script at the Radiator faq docs. Why do we multiply the $total and $accttotal values by 8. Any idea?
Tuncay Margilic
System Adm.
Siemens Business Services
#!/usr/bin/perl
$total = 0;
$accttotal = 0;
open(FD, "/usr/bin/snmpwalk host secret .1.3.6.1.3.79.1.1.1.6.1.4 |") or die;
while(<FD>)
{
$total += $1 if (/.* = (\d+)/);
}
close(FD);
open(FD, "/usr/bin/snmpwalk host secret .1.3.6.1.3.79.1.1.1.6.1.12 |") or die;
while(<FD>)
{
$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;