<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-2" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Looking at the source of rlm_sqlcounter i saw that when a users tries
to conect at a time close to the next reset time, the value of the
check-item for the next cycle is added to the reply item.<br>
I'd like to avoid this behaviour for <b>*some*</b> of my users. Indeed
I want to use counters to count traffic and <b>*not*</b> time while
rlm_sqlcounter decide it's closed to reset time when check-item -
counter (in my case: bytes) is less than the number of second untill
reset time.<br>
<br>
Can i disable this behaviour? how?<br>
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:tnt@kalik.net">tnt@kalik.net</a> a écrit :
<blockquote cite="mid:Q3qmiQth.1221002863.2908150.tnt@kalik.net"
type="cite">
<pre wrap="">reset parameter controls value of %b.
Ivan Kalik
Kalik Informatika ISP
Dana 9/9/2008, "Alexandre Chapellon" <a class="moz-txt-link-rfc2396E" href="mailto:alexandre.chapellon@mana.pf"><alexandre.chapellon@mana.pf></a> pi¹e:
</pre>
<blockquote type="cite">
<pre wrap="">so what's the use of the reset parameter if th sql query is managing it
all by its own?
Alexandre Chapellon a écrit :
</pre>
<blockquote type="cite">
<pre wrap="">
<a class="moz-txt-link-abbreviated" href="mailto:tnt@kalik.net">tnt@kalik.net</a> a écrit :
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">here is the counter definition:
sqlcounter bytesQuota {
counter-name = traffic_quota
check-name = Max-Traffic
reply-name = Tmp-Integer-0
sqlmod-inst = mysqldb
key = User-Name
reset = hourly
query = "SELECT SUM(acctinputoctets + acctoutputoctets) FROM
radacct WHERE UserName='%{%k}'"
}
sounds good to me... what could be the reasn for noreset?
</pre>
</blockquote>
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap=""> query = "SELECT SUM(acctinputoctets + acctoutputoctets) FROM
radacct WHERE UserName='%{%k}'"
</pre>
</blockquote>
<pre wrap="">You need to add to WHERE one of the statements using %b.
</pre>
</blockquote>
<pre wrap="">Ouch i didn't saw that in the example queries... spank my ...!
</pre>
<blockquote type="cite">
<pre wrap="">Ivan Kalik
Kalik Informatika ISP
-
List info/subscribe/unsubscribe? See <a class="moz-txt-link-freetext" href="http://www.freeradius.org/list/usershtml">http://www.freeradius.org/list/usershtml</a>
</pre>
</blockquote>
<pre wrap="">------------------------------------------------------------------------
-
List info/subscribe/unsubscribe? See <a class="moz-txt-link-freetext" href="http://www.freeradius.org/list/users.html">http://www.freeradius.org/list/users.html</a>
</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<pre wrap=""><!---->
-
List info/subscribe/unsubscribe? See <a class="moz-txt-link-freetext" href="http://www.freeradius.org/list/users.html">http://www.freeradius.org/list/users.html</a>
</pre>
</blockquote>
</body>
</html>