Who's On
Author: Mike Nice niceman@worldnet.att.net
Copyright © Mike Nice, 1999
This program may be freely used and modified for your own use, provided
this notice remains intact.
-
There are no expressed or implied warranties with this software.
-
All liabilities in the use of this software rest with the user.
Purpose: To view user login information on RADIUS accounting server.
How it works
The RADIUS accounting code has a shared memory block in which it records
an image of who is logged in by examining RADIUS accounting START and STOP
records. WhosOn generates an HTML-formatted page with accounting information.
In order to view this information, the RADIUS server must also be running
a webserver, or you could schedule the CGI version to send its output to
a shared network drive.
With this design, accounting records sent to a backup accounting server
will not appear on the who's on page. However, you may designate backup
authentication servers with no side effects.
There are 2 versions of this program included:
-
WHOSON.EXE - CGI version to work with any webserver.
-
WHOSON.DLL - PowerWeb add-in will work only with PowerWeb webserver. The
advantage is that it uses Netscape's ServerPush format and provides updates
as soon as they occur (no more frequently than once per 15 seconds and
every 90 seconds if no one logs in or out).
Installation
CGI version Whoson.exe installation - Copy to your webserver's CGI-BIN
directory.
Optional Arguments:
RefreshRate=nn - Request automatic page refresh
of nn seconds.
portFormat=slot - Changes raw port number
to a 3Com HiperArc style slot:port type of display.
Usage examples:
-
http://yourServer.yourDomain.com/cgi-bin/whoson.exe
displays current page with no automatic refresh
-
http://yourServer.yourDomain.com/cgi-bin/whoson.exe?portFormat=slot
displays current page with ports listed in 3Com
format and no automatic refresh
-
http://yourServer.yourDomain.com/cgi-bin/whoson.exe?portFormat=slot&refreshRate=60
displays current page with ports listed in 3Com
format and automatic refresh every 60 seconds
PowerWeb version WHOSON.DLL installation - copy to your webserver's
BIN directory.
Optional Arguments:
portFormat=slot - Changes raw port number
to a 3Com HiperArc style slot:port type of display.
Usage examples:
-
http://yourServer.yourDomain.com/bin/whoson!WhosOn
displays current page, updates as accounting records
are received.
-
http://yourServer.yourDomain.com/bin/whoson!WhosOn?portFormat=slot
displays current page with ports listed in 3Com
format
Sample output format in straight port numbers:
Current Users
yourServer.yourDomain.com |
Total users: 4 |
Username |
Port |
IP Addr |
Time Online |
alvin |
1 |
10.10.3.21 |
00:05:02 |
theodore |
2 |
10.10.3.72 |
01:04:54 |
fred |
6 |
10.10.3.28 |
00:00:05 |
wilma |
8 |
10.10.3.47 |
00:05:36 |
|
Column meanings |
Username |
Port |
IP Addr |
Time Online |
Username reported by RADIUS client |
NAS Port number. Some equipment reports this starting at 1, others
encode a combination of slot / rack / modem number. Display is sorted
by port number. |
Address reported by RADIUS client |
Time since accounting START record was received. Note that if
the accounting server was down at the time the user logged in, the user
may have been logged in longer. The accounting STOP record will record
the correct online time for billing purposes. Times less than 1 minute
are listed in bold. |
Sample output in 3Com format:
yourServer.yourDomain.com |
Total users: 7 |
Username |
Slot: Port |
IP Addr |
Time Online |
alvin |
7:1 |
10.10.3.111 |
00:44:33 |
theodore |
7:9 |
10.10.3.150 |
00:23:11 |
fred |
7:23 |
10.10.3.145 |
02:27:59 |
wilma |
7:24 |
10.10.3.23 |
00:26:15 |
barney |
8:1 |
10.10.3.136 |
00:09:00 |
george |
8:2 |
10.10.3.60 |
01:55:32 |
pebbles |
8:3 |
10.10.3.98 |
00:18:44 |
|
If your equipment encodes the NAS port number differently, you can add
its representation in the source code.
Security note: Consider putting this program on a protected page;
if you make this information public, sooner or later someone will harvest
your customer list to send spam if not worse!