Get Online User From FreeRadius
I am creating a usage stats web-page that will show current online users and have a historical graph of users at a given time/date. Is there a function in freeradius to easily grab the number of current connected users I can then dump into a database for my webpage to use in the usage chart? The only solution I have found is reading the acct table with a cron-job every 15 minutes, I'm hoping there is a better solution I haven't found yet.
No, freeradius doesn't track the state of accounting sessions internally. You need to write the accounting data to a database, which you can then query to get number of concurrent sessions at a given point. There's some example SQL queries in this question that may help you: Calculate number of concurrent events in SQL If you didn't want to use complex SQL you could poll the database every few minutes, and get a count of sessions with no stop time (still active), then record the count in a separate table.
SELECT username from radacct WHERE username LIKE '%#wireless%' AND acctstoptime IS NULL GROUP BY username
Unable to authorize on FreeRADIUS
how can I configure FreeRADIUS to proxy the PAP request inside an EAP-PEAP-GTC tunnel?
Configure FreeRADIUS to only support EAP TTLS PAP
Freeradius V3 meta-attributes. Check item attributes
Freeradius Crypt-Password authentication
How to get User-Password in inner tunnel from iOS
freeRadius using EAP with custom auth script
How do I validate different users for different SSIDs on a FreeRADIUS server?
FreeRADIUS - how to create a profile for two differnet NAS
Free Radius - Session Timeout, Idle Timeout (disconnecting idle users)
Error from FreeRadius3: No dictionary definition for EAP method md5
Freeradius Unlang Checks against user file
running freeradius on ubuntu 12.04 LTS fails
How to configure a freeradius server to require NAS-IP-Address attribute?
freeradius sqlcounter reply-message and coovachilli
How to set the group a user belongs to in FreeRadius?