Hi,
i'm configuring a server with a sql counter to check the total byte in a
week for the users.
But the server will reply a wrong count.

Here's the counter:

sqlcounter weeklybytecounter {
counter-name = Weekly-Total-Max-Octets
check-name = Max-Weekly-Octets
reply-name = Mikrotik-Total-Limit
sqlmod-inst = sql
key = User-Name
reset = weekly
query = "SELECT (SUM(acctinputoctets)+SUM(acctoutputoctets)) FROM radacct
WHERE UserName='%{%k}' AND UNIX_TIMESTAMP(acctstarttime) + acctsessiontime
> '%b'"


But the reply doesn't is the operation between (check-name value) - (query
value)

for example:

rlm_sqlcounter: Authorized user fabrizio, check_item=3000000000,
counter=38101894

I expect a reply of 3000000000 - 38101894 = 2961898106

but i receive different value also bigger.....


Any idea ?


-- 
Fabrizio Fiore Donati

Mobile: +39 3289872420
E-mail: fabrizio.fioredon...@2bite.net

2bite s.r.l.
Via Saragat snc
67100 L'Aquila (AQ) - Italy
Tel.: +39 0862441583
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to