I would assume because the logged values are bytes, and teh script wants the
value in bits.
> Tuncay MARGILIC wrote:
> 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;
--
-Jason J. Horton <[EMAIL PROTECTED]>
Fat Man in a Little Coat
Intercom Online Inc.
212.376.7440 | http://www.intercom.com
===
Archive at http://www.starport.net/~radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.