sql counter clarification and issues

Ross Tsolakidis Ross.Tsolakidis at day3.com.au
Tue Jul 12 07:21:52 CEST 2005


 Ok, now I'm really confused  :(

Can someone please clarify exactly what does the sqlcounter module do ?
Basically I need to calculate the data on a daily basis for each user.

Thanks for your patience  :)

Regards,
--
Ross


-----Original Message-----
From: freeradius-users-bounces at lists.freeradius.org
[mailto:freeradius-users-bounces at lists.freeradius.org] On Behalf Of Ross
Tsolakidis
Sent: Tuesday, 5 July 2005 2:14 PM
To: FreeRadius users mailing list
Subject: RE: sql counter clarification and issues 

Yes the server is receiving accounting packets.
The SQL rows are updating every 5 mins, (I have the NAS set to send
accounting packets every 5 mins).
 
I run it in debug mode, I see:
Module: Loaded SQL Counter
 sqlcounter: counter-name = "Daily-Session-Time"
 sqlcounter: check-name = "Max-Daily-Session"
 sqlcounter: key = "User-Name"
 sqlcounter: sqlmod-inst = "sqlcca3"
 sqlcounter: query = "SELECT SUM(AcctSessionTime - GREATEST((%b -
UNIX_TIMESTAMP(AcctStartTime)), 0)) FROM radacct WHERE UserName='%{%k}'
AND UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '%b'"
 sqlcounter: reset = "1h"
rlm_sqlcounter: Counter attribute Daily-Session-Time is number 1671
rlm_sqlcounter: Check attribute Max-Daily-Session is number 1672
rlm_sqlcounter: num=1, last=h
rlm_sqlcounter: Current Time: 1120532709 [2005-07-05 13:05:09], Next
reset 1120536000 [2005-07-05 14:00:00]
rlm_sqlcounter: num=1, last=h
rlm_sqlcounter: Current Time: 1120532709 [2005-07-05 13:05:09], Prev
reset 1120532400 [2005-07-05 13:00:00]
Module: Instantiated sqlcounter (dailycounter)

But no reset.

Does anyone have this working, if so, what am I looking for, what am I
supposed to see ?

Thanks  :)

Regards,
--
Ross

-----Original Message-----
From: freeradius-users-bounces at lists.freeradius.org
[mailto:freeradius-users-bounces at lists.freeradius.org] On Behalf Of Alan
DeKok
Sent: Tuesday, 5 July 2005 2:05 AM
To: FreeRadius users mailing list
Subject: Re: sql counter clarification and issues 

"Ross Tsolakidis" <Ross.Tsolakidis at day3.com.au> wrote:
> At midnight every night will it begin a new row in SQL ?

  I don't know, I've never used the module.

> Because at the moment there are no new rows being created, no counters

> being reset.

  Is the server receiving accounting packets?

  Run it in debug mode with "reset=hour", and spend some time looking at
what it's doing.

  Alan DeKok.
-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html

-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html




More information about the Freeradius-Users mailing list