Search Again:

Re: bandwidth usage

From: Javier Galvez
Date: Saturday, September 27, 2003
Time: 1:59:35 pm

isp-list@optigold.com writes:
>I want to import the amount of bandwidth used by my customers. I am using
>icradius so the info is in the accounting table. I see several references
>in the archives but then another reference that the previous one didn't
>work. Does anyone have a working import of this?

Patti,

For importing (including monthly) I use:

SELECT
UserName,count(UserName),sum(AcctSessionTime+(60-(AcctSessionTime%60))),sum((((AcctInputOctets+AcctOutputOctets)/1024)/1024))
FROM radacct WHERE AcctStopTime >= '<Y1>-<M1>-<D1>' AND AcctStopTime <=
'<Y2>-<M2>-<D2>' GROUP BY UserName;

For STATEMENTS I use:

SELECT
AcctStopTime,'',AcctSessionTime+(60-(AcctSessionTime%60)),AcctInputOctets+AcctOutputOctets,FramedIPAddress,NASIPAddress,NASPortId,AcctTerminateCause
FROM radacct WHERE UserName = '<Login>' ORDER BY AcctStopTime desc limit
30;

For Generic 1 statement:

SELECT
AcctStopTime,(AcctSessionTime+(60-(AcctSessionTime%60)))/60,FramedIPAddress,AcctTerminateCause
FROM radacct WHERE UserName = '<Login>' ORDER BY AcctStopTime desc limit
10;

I use ICRADIUS for "proxy" authentication, and my main radius
authentication is running under MACRADIUS Works great for me.

Javier Galvez
MegaLink
+(591)-715-22149
jcgalvez@megalink.com



---------------------------------------------------
To subscribe, unsubscribe or to search list archive
please visit http://www.optigold.com/lists/isp.html
---------------------------------------------------



Messages In This Thread:



Return to Digital Point Solutions' Home Page