Max-Monthly-Traffic

Neville nev at itsnev.co.uk
Tue Feb 9 23:12:55 CET 2010


Anyone please, as this is driving me mad...

Thx
Nev
  ----- Original Message ----- 
  From: Neville 
  To: freeradius-users at lists.freeradius.org 
  Sent: Sunday, February 07, 2010 1:28 PM
  Subject: Max-Monthly-Traffic


  Sorry for troubling everyone on this, but I cannot work out why Session-Octets-Limit is not calculating the differences between the counter and the check_item and setting an higher limited than the check_item?

  Log below

  Sun Feb  7 12:59:50 2010 : Debug: rlm_sqlcounter: Check item is greater than query result
  Sun Feb  7 12:59:50 2010 : Debug: rlm_sqlcounter: Authorized user FT-memjxa, check_item=262100000, counter=151223038
  Sun Feb  7 12:59:50 2010 : Debug: rlm_sqlcounter: Sent Reply-Item for user FT-memjxa, Type=Session-Octets-Limit, value=263954010
  Sun Feb  7 12:59:50 2010 : Info: ++[monthlytraffic] returns ok


  sqlcounter monthlytraffic {
           counter-name = Monthly-Traffic
                  check-name = Max-Monthly-Traffic
                  reply-name = Session-Octets-Limit
                  sqlmod-inst = sql
                  key = User-Name
                  reset = monthly
           query = "SELECT IFNULL((sum(acctinputoctets)+sum(acctoutputoctets)),0) FROM radacct WHERE username='%{%k}' AND Month(acctstoptime) =(Month(NOW())) AND Year(acctstoptime) = Year(NOW())"
  }


  Any pointers would help.

  Thx
  Nev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20100209/b4fbbdc3/attachment.html>


More information about the Freeradius-Users mailing list