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