sqlcounter doesn't work with bytes instead of time
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.fioredonati@2bite.net 2bite s.r.l. Via Saragat snc 67100 L'Aquila (AQ) - Italy Tel.: +39 0862441583
This is already resolved in version 3.x.x Sent on my BlackBerry® from Vodafone -----Original Message----- From: Fabrizio Fiore Donati <fabrizio.fioredonati@2bite.net> Sender: freeradius-users-bounces+vijay.hcr=gmail.com@lists.freeradius.org Date: Mon, 21 Oct 2013 07:26:00 To: <freeradius-users@lists.freeradius.org> Reply-To: FreeRadius users mailing list <freeradius-users@lists.freeradius.org> Subject: sqlcounter doesn't work with bytes instead of time - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (2)
-
Fabrizio Fiore Donati -
vijay.hcr@gmail.com