Get number of users logged in via mySQL

Renato Sousa rensousa at gmail.com
Mon Dec 17 17:54:46 CET 2018


>
> Hello  Alan DeKok,
>


>   Count the rows in the radacct which have a NULL acctstoptime.
>
>> 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;
>
>
>> 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. :(
>
>

>   The server just records what the NAS sends it.  If the NAS doesn't tell
> the server those sessions are closed, then the server doesn't know.
>
> > How to get this precise value through mySQL tables?
>
>   Fix that NAS so that it closes old sessions.
>
>   The server isn't magic.  It only knows what the NAS sends it.  If the
> NAS tells it that the same user logged in 4 times, well, why would
> FreeRADIUS think any differently?
>
Yes, exactly!
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?
Anyone have any tips to improve this diagnosis?

>
> > 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.

>
>   Alan DeKok.
>
>
> Best Regards,

Renato Sousa


More information about the Freeradius-Users mailing list