Get number of users logged in via mySQL
Alan DeKok
aland at deployingradius.com
Mon Dec 17 20:47:53 CET 2018
On Dec 17, 2018, at 11:54 AM, Renato Sousa <rensousa at gmail.com> wrote:
>>> Yes ... If the information provided by NAS were correct a sentence as
>>> below would solve the question:
>>
>> select count (*) from radaact where acctstoptime is null;
If the NAS is lying to FreeRADIUS, then there is little you can do.
>>> However, when I go to analyze the selected records, I see repeated
>>> records with the same device mac-address.
>>
>> Right now I saw that my user does not have an open session on radius. :(
I don't know what that means. More correctly, I don't know what *you* think that means.
The radacct table just stores the data sent by the NAS. If there are multiple session in the DB for a user, then:
a) the user has multiple sessions
or
b) the NAS isn't sending FreeRADIUS "stop" packets when a session closes.
There really aren't any other options.
> Most of my APs are Ubiquiti, but I also have Cisco, HP, and Aruba on my
> infraestructure. Is there any incompatibility with these manufacturers when
> users move from one to another?
No. They just send RADIUS packets.
> Anyone have any tips to improve this diagnosis?
Look on the NAS to see which users are online. Most NASes should provide an admin interface to do this.
>>> How to delete these open sessions?
>>
>> SQL statements.
>>
> I have already done an UPDATE in the tables to insert date in the old
> records with acctstoptime equal to NULL, however they continue to be
> generated.
Then the user has multiple sessions. You will need to configure Simultaneous-Use to ensure that each user has only one session active at a time.
Alan DeKok.
More information about the Freeradius-Users
mailing list