freeradius


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

Related Links

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?

Categories

HOME
qt
elasticsearch
list
adfs3.0
d3.js
swi-prolog
apk
yql
phpseclib
hystrix
csrf
game-maker
clish
mpu6050
powermock
django-rq
xbox360
closures
pfobject
raml
generator
ratio
sap-lumira
sendmessage
laravel-4.2
tsung
toad
progid
private-key
db2-luw
cartopy
microsoft-ui-automation
haar-classifier
latexml
android-5.0-lollipop
scala-breeze
password-hash
phppgadmin
palindrome
predicates
mpmovieplayercontroller
kendo-treeview
xcode6.4
system.web.optimization
nunit-console
dojo-build
meld
highlighting
xcopy
gravatar
wikimedia-commons
lovefield
cryptojs
largenumber
nette
ngcordova
web-api
text-align
jcheckbox
datagridcomboboxcolumn
rebar
zend-mail
nesper
berkeley-db-xml
redpitaya
incognito-mode
zend-search-lucene
ivalueconverter
jmenubar
colon
disjoint-union
web-frameworks
idispatch
chronometer
jquery-1.4
3des
ixmldomdocument
eventaggregator
rational-unified-process
yahoo-maps
gtktextview
iphone-sdk-3.1.3
service-factory
parentid

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App