Re: (RADIATOR) Perl script question

2000-06-07 Thread Jason J. Horton

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 += $1if (/.* = (\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 += $1if (/.* = (\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.



RE: (RADIATOR) Perl script question

2000-06-07 Thread Tuncay MARGILIC
Title: RE: (RADIATOR) Perl script question





But the values which in $total and $accttotal are number of access and accounting requests...they are not bytes per second


Tuncay


-Original Message-
From: Jason J. Horton [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 07, 2000 8:19 PM
To: Tuncay MARGILIC
Cc: [EMAIL PROTECTED]
Subject: Re: (RADIATOR) Perl script question



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





Re: (RADIATOR) Perl script question

2000-06-07 Thread Hugh Irvine


Hello Tuncay -

On Thu, 08 Jun 2000, Tuncay MARGILIC wrote:
 
 
 Hi there,
 
 I found this script at the Radiator faq docs. Why do we multiply the $total
 and $accttotal values by 8. Any idea?
 

This script is used with MRTG to generate skyline graphs of traffic. Check the
MRTG package to see the exact definitions of the values.

regards

Hugh


-- 
Radiator: the most portable, flexible and configurable RADIUS server 
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald, 
Platypus, Freeside, Interbiller, TACACS+, PAM, external, etc, etc.
Available on Unix, Linux, FreeBSD, Windows 95/98/2000, NT, MacOS X.



===
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.