sql counter clarification and issues

Ross Tsolakidis Ross.Tsolakidis at day3.com.au
Mon Jul 4 04:49:07 CEST 2005

Hi all,

Ok I've set it all up, it looks like it's working, when I look in the
debug I see:

Module: Instantiated sql (sql)
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 = "daily"
rlm_sqlcounter: Counter attribute Daily-Session-Time is number 1671
rlm_sqlcounter: Check attribute Max-Daily-Session is number 1672
rlm_sqlcounter: Current Time: 1120445182 [2005-07-04 12:46:22], Next
reset 1120485600 [2005-07-05 00:00:00]
rlm_sqlcounter: Current Time: 1120445182 [2005-07-04 12:46:22], Prev
reset 1120399200 [2005-07-04 00:00:00]
Module: Instantiated sqlcounter (dailycounter)
Module: Loaded Acct-Unique-Session-Id
 acct_unique: key = "User-Name, Acct-Session-Id, NAS-IP-Address,
Client-IP-Address, NAS-Port"
Module: Instantiated acct_unique (acct_unique)

So I understand what it's meant to do:
At midnight every night will it begin a new row in SQL ?
So let's say that someone has maintained a connection all day, SQL will
create a new row ?
Am I understanding this correctly ?
Because at the moment there are no new rows being created, no counters
being reset.

Cheers, thanks again.


-----Original Message-----
From: freeradius-users-bounces at lists.freeradius.org
[mailto:freeradius-users-bounces at lists.freeradius.org] On Behalf Of Alan
Sent: Thursday, 30 June 2005 1:41 AM
To: FreeRadius users mailing list
Subject: Re: sql counter clarification and issues 

"Ross Tsolakidis" <Ross.Tsolakidis at day3.com.au> wrote:
> Can you give me an example of how to set the counter to reset in SQL ?

  No, I said "sqlcounter".  It's a separate module.  See

  Alan DeKok.
List info/subscribe/unsubscribe? See

More information about the Freeradius-Users mailing list