On 3/22/07, guest01 <[EMAIL PROTECTED]> wrote:

Hi guys!

I have two minor problems with the radius counter. I am using the radius
counter for counting the "sessiontimeout", which works quite good.

counter sessiontimeout {
       filename = ${logdir}/db.sessiontimeout
       key = User-Name
       count-attribute = Acct-Session-Time
       reset = never
       counter-name = Daily-Session-Time
       check-name = Session-Timeout
       cache-size = 5000
}

If the user reaches the saved allowed max session time, the connection
gets disconnected and the user is not allowed to connect again until the
time value has been reseted. Works great ...

I also want to achieve the same behavior for another counter, the
Acct-Input-Octets, but it doesn't really work. I can define a maximum
value for "Input Octets" and if the user exceeds this value, he cannot
connect again. Unfortunately, the connection doesn't get disconnected
after the user reached his limit, do I have to configure something
additional? It works for the Sessiontimeout, why doesn't it work for the
Input-Octets? Any ideas? Is it possible?

counter maxinput {
       filename = ${logdir}/db.maxinput
       key = User-Name
       count-attribute = Acct-Input-Octets
       reset = never
       counter-name = Input-Octets
       check-name = ChilliSpot-Max-Input-Octets
       cache-size = 5000
}


I face the same problem on Freeradius 1.1.3, and to overcome the situation,
I wrote a perl script to set the correct ChilliSpot-Max-Input-Octets for
Freeradius. But I have upgraded to Freeradius 1.1.4, the no more problem
with it.


The second problem is, that I have Acct-Input-Octets AND
Acct-Output-Octets in my radius dialog and I want to use ONE counter,
which should contain the sum of Acct-Input-Octets+Acct-Output-Octets, I
already tried to use
count-attribute = (Acct-Input-Octets+Acct-Output-Octets),
but it didn't work ... Any suggestions for that problem? Any ideas?


U can specify the sql "query" for the counter:
counter maxinput {
      filename = ${logdir}/db.maxinput
      key = User-Name
      count-attribute = Acct-Input-Octets
      reset = never
      counter-name = Input-Octets
      check-name = ChilliSpot-Max-Input-Octets
      query = "SELECT SUM(Acct-Input-Octets+Acct-Output-Octets) FROM
radacct where UserName='%{%k}'"
}


I appreciate every kind of help!
Thanks guys!

best regards
Peter Gastinger

-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html




--
Best Regards,

Fadli M. Zain
Leadership and Lifelong Learning
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to