Centralized Logon Accounting (whoson)
WhosOn Linux - Index
It's the same code for both Linux, UNIX or Mac OS X, but please read the Mac OS X specific instructions.
The client application is intended to be runned at logon/logoff to register session start/stop events thru the web service. It also supports an session mode, were it stays in the background waiting to register an logoff event at process termination.
Information about the logged on user and computer is queried from a number of different sources like Kerberos and Samba, with fallback to standard system calls using the C library.
A bit of explanation is required here as the page header is a bit missleading: This application is not Linux specific as it can be runned on most OS, probably even Windows after some modifications.