sqlcounter help

Mordor Networks mordor.networks at gmail.com
Mon Sep 6 07:53:28 CEST 2010


Dear Gentlemen
I'm having a problem with my daily count :

sqlcounter chillispot_max_bytes_daily {
counter-name = ChilliSpot-Max-Total-Octets
check-name = ChilliSpot-Max-Total-Octets
reply-name = ChilliSpot-Max-Total-Octets
sqlmod-inst = sql
key = User-Name
reset = daily
query = "SELECT SUM(AcctInputOctets - GREATEST((%b -
UNIX_TIMESTAMP(AcctStartTime)), 0))+ SUM(AcctOutputOctets -GREATEST((%b -
UNIX_TIMESTAMP(AcctStartTime)), 0))
FROM radacct WHERE UserName='%{%k}' AND UNIX_TIMESTAMP(AcctStartTime) +
AcctSessionTime > '%b'"
}

It is disconnecting the user if limit is reached but user can connect again
like it is not stopping the account, now if i replace the query with #query
= "SELECT (SUM(AcctInputOctets)+SUM(AcctOutputOctets)) FROM radacct WHERE
UserName='%{%k}'" that will disconnect the account and it wont be able to
connect again but the problem here with reset , how i will be able to reset
daily?
Best regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20100906/37d24b00/attachment.html>


More information about the Freeradius-Users mailing list