[isf-wifidog] Authserver database and user online/offline status?

Andrew Hodel andrewhodel at gmail.com
Lun 16 Mar 22:21:39 EDT 2009


Can anyone enlighten me as to how the auth server knows if someone is
online or offline at any given moment?

At first I thought that if a row from the connections table had a
timestamp_out value of NULL that would mean the connection is still
online.  That does not seem to be true by any means.

Second I thought that if a connections token 'token_status' in the
tokens table was INUSE it would mean the connection is still online.
That does not seem to be true either.

Anyone have any insight into this, we run a particularly large network
and at the current time of running these queries on the live database
there were only 44 users (users by mac address) online at that point
in time.  However if I were to count online users by the timestamp_out
column of the connections table it would lead me to believe that 1818
users were online.  Conversely if I were to calculate online users by
the tokens table and token_status I would be left with 579 users
online.  Neither of these are true.

Data goes back 11 months on this system.  However if I test for just
the past week there are discrepancies like the ones shown below:


wifidog=# select count(*) from connections;
 count
--------
 135490
(1 row)

wifidog=# select count(*) from connections where timestamp_out is null;
 count
-------
  1818
(1 row)

wifidog=# select count(*) from connections where timestamp_out is not null;
 count
--------
 133672
(1 row)

wifidog=# select count(*) from tokens;
 count
--------
 162557
(1 row)

wifidog=# select count(*) from tokens where token_status = 'USED';
 count
--------
 135379
(1 row)

wifidog=# select count(*) from tokens where token_status = 'INUSE';
 count
-------
   579
(1 row)

wifidog=# select count(*) from tokens where token_status = 'UNUSED';
 count
-------
 26600
(1 row)




Regards,
Andrew Hodel


Plus d'informations sur la liste de diffusion WiFiDog