After checking back through the cvs history it seems that it has never been like this. I am currently out of the office on holiday, but I will certainly check this in in the near future.

Cheers

Peter

David wrote:

I had this problem with mysql and Dustin Doris mentioned the sql.conf file
for you it would be the postgresql.conf file.  You need to change the update
statement to update the rest of the information.  I am not sure why it does
not do it by default.

David


David Blood Account Executive SpeedyQuick Networks, Inc Boise, Id www.speedyquick.net 208.284.5505

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Peter Nixon
Sent: Tuesday, November 25, 2003 4:14 PM
To: [EMAIL PROTECTED]
Subject: Re: Postgresql Traffic Accounting Update


Arthur B Olsen wrote:



The Acct-Interim-Interval does not update the acctinputoctets and

acctoutputoctets in postgresql as it does in files.


I dont know if this is the desired behavior, or if this is a mistake.

But to correct/change this, you can change your postgresql.conf like this:

#       accounting_update_query = "UPDATE ${acct_table1} \
#               SET FramedIPAddress = NULLIF('%{Framed-IP-Address}',

'')::inet \


# WHERE AcctSessionId = '%{Acct-Session-Id}' AND UserName =

'%{SQL-User-Name}' \


# AND NASIPAddress= '%{NAS-IP-Address}' AND AcctStopTime IS

NULL"


       accounting_update_query = "UPDATE ${acct_table1} \
               SET FramedIPAddress = NULLIF('%{Framed-IP-Address}',

'')::inet, \


AcctInputOctets = (('%{Acct-Input-Gigawords:-0}'::bigint

<< 32) + '%{Acct-Input-Octets:-0}'::bigint), \


AcctOutputOctets = (('%{Acct-Output-Gigawords:-0}'::bigint

<< 32) + '%{Acct-Output-Octets:-0}'::bigint) \


WHERE AcctSessionId = '%{Acct-Session-Id}' AND UserName =

'%{SQL-User-Name}' \


AND NASIPAddress= '%{NAS-IP-Address}' AND AcctStopTime IS

NULL"


And your accounting will be updated with the interval set with

Acct-Interim-Interval.



Thanks.


I will check this into CVS tomorrow.

Peter


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


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



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

Reply via email to