Search Again:

Re: raddct and ICraduis

From: Optigold List
Date: Tuesday, June 17, 2003
Time: 11:00:38 pm

I use the following with ICRadius to have the automated task grab usage
data periodically:

SELECT
LOWER(LEFT(UserName,(LOCATE("@domain.com",UserName)-1))),count(UserName)
,sum(AcctSessionTime) FROM radacct WHERE AcctStartTime >= '<ATD> <ATT>'
GROUP BY UserName

My RADIUS server uses full email addresses for the user names. You'll
have to modify it accordingly if yours doesn't. By the way, with both
'AcctStartTime >= ' and 'AcctStopTime <= ' you could possibly get some
duplicate data if <Y2>-<M2>-<D2> becomes <Y1>-<M1>-<D1> when you run it
the second time. Anything equal to Y2-M2-D2 will get counted twice.

Ron


Thunderbolt Computing
644 Strander Blvd #260 Phone: 206-575-4510
Seattle, WA 98188 Fax: 206-575-4501
Web: www.thunderbolt.net


> -----Original Message-----
> From: isp-list@optigold.com [mailto:isp-list@optigold.com] On Behalf
Of
> Patti Jones
> Sent: Tuesday, June 17, 2003 2:07 PM
> To: Optigold
> Subject: [Optigold ISP] raddct and ICraduis
>
> I am trying to get usage from icradius. I have the following setup
for
> hooks but it doesn't seem to work. What sql scripts is someone else
using
> for this.
>
> SELECT UserName,count(UserName),sum(AcctSessionTime) FROM radacct
WHERE
> AcctStartTime >= '<Y1>-<M1>-<D1>' AND AcctStopTime <= '<Y2>-<M2>-<D2>'
> GROUP
> BY UserName
>
>
> ---------------------------------------------------
> To subscribe, unsubscribe or to search list archive
> please visit http://www.optigold.com/lists/isp.html
> ---------------------------------------------------


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