Services and tunnels
radwho
Lists who is logged in right now, by the RADIUS server's accounting records alone.
Every accounting Start a NAS sends adds a session to FreeRADIUS's radutmp table, and its Stop removes it.
radwho reads that table: user, NAS and port, since when, and from where. The server never asks the devices, so a
session whose Stop was lost (the device crashed, the server was down) stays listed until the device's next
Accounting-On. Each record is also written to a detail file, one folder per NAS:
/var/log/radius/radacct/<NAS address>/detail-<date>.
radwho command usage
radwho [-r] [-u USER]
Options
-
-r - raw, comma-separated output for scripts
-
-u USER - only that user's sessions
radwho examples
-
radwho - Shows the sessions the RADIUS server believes are open.
-
tail -12 /var/log/radius/radacct/10.0.1.2/detail-* - The last accounting record from one NAS: Start or Stop, the session ID and, in a Stop, Acct-Session-Time.
Pitfalls
- FreeRADIUS keeps radutmp only when the radutmp module is listed in its accounting section (commented out by default).