On Mon, 21 Feb 2005, Graeme Lee wrote:
N White wrote:
I currently have freeradius 1.0.1 running with the dialupadmin from 1.0.2 on Debian Sarge. I was just curious if there is anyway to pull monthly total hours for all users. The user statistics isn't exactly what i need, it shows daily user statistics, so if I show a week of statistics, i get 7 entries per user(assuming the user has logged on every day).SELECT username, sum(acctsessiontime) AS time FROM radacct GROUP BY username ORDER BY time;
Basically I'd like to be able to see how much total time in a month users/a user are connected.
You can add a where clause to suite whatever you need.
You can have a look at some screen caps I've done of our web interface at http://www2.omniconnect.com.au/~graeme/darius/
we use jpgraph to make the fancy graphs.
The totacct and mtotacct tables of dialupadmin are your friend. mtotacct should contain user statistics on a per month basis (as long as you run the corresponding bin scripts from cron). You can run queries on these tables to get what you want. Or you can use the stats page, put in a month period and read the sum values at the end of the page.
Have fun!
Graeme
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- Kostas Kalevras Network Operations Center [EMAIL PROTECTED] National Technical University of Athens, Greece Work Phone: +30 210 7721861 'Go back to the shadow' Gandalf
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

