FR and Pgsql

Paul Khavkine paul.khavkine at distributel.ca
Wed Nov 16 20:45:21 CET 2005


Hi Folks.


I'm setting up FreeRADIUS with Postgres for accounting and there's one
thing i can't seem to figure out.

When a Start record gets written to radacct table, AcctStopTime is not
being set to anything. The field is empty. Since AcctStopTime is
of type "timestamp with time zone" it does not seem to equal to NULL or
'0' or anything at all.

radius=# select * from radacct where acctstoptime = NULL;
 radacctid | acctsessionid | acctuniqueid | username | realm |
nasipaddress | nasportid | nasporttype | acctstarttime | acctstoptime |
acctsessiontime | acctauthentic | connectinfo_start | connectinfo_stop |
acctinputoctets | acctoutputoctets | calledstationid | callingstationid
| acctterminatecause | servicetype | framedprotocol | framedipaddress |
acctstartdelay | acctstopdelay
-----------+---------------+--------------+----------+-------+--------------+-----------+-------------+---------------+--------------+-----------------+---------------+-------------------+------------------+-----------------+------------------+-----------------+------------------+--------------------+-------------+----------------+-----------------+----------------+---------------
(0 rows)

radius=# select * from radacct where acctstoptime = 0;
 radacctid | acctsessionid | acctuniqueid | username | realm |
nasipaddress | nasportid | nasporttype | acctstarttime | acctstoptime |
acctsessiontime | acctauthentic | connectinfo_start | connectinfo_stop |
acctinputoctets | acctoutputoctets | calledstationid | callingstationid
| acctterminatecause | servicetype | framedprotocol | framedipaddress |
acctstartdelay | acctstopdelay
-----------+---------------+--------------+----------+-------+--------------+-----------+-------------+---------------+--------------+-----------------+---------------+-------------------+------------------+-----------------+------------------+-----------------+------------------+--------------------+-------------+----------------+-----------------+----------------+---------------
(0 rows)


How do you buidl a query to fetch a list of sessions without
AcctStopTime (sessions in progress for example) ?

This is on PgSQL 8.1.0.

Thanx
Paul




More information about the Freeradius-Users mailing list