An Interactive Process Killer

Finally, we get to the serious work.

A variant of the next script is currently in use in a business setting. Here's the scenario: A central database server is consulted all day long by client machines throughout a workplace. The clients are running various versions of Windows, and the server is an old, underpowered, and overworked Unix machine. The client application running on the Windows workstations is interactive; it's possible for a user to walk away from a session without remembering to log out, and the server can handle only so many users at a time. So it's occasionally necessary for the system administrator to kick some users off the system.

But who gets kicked off is not an automatic choice dictated by inflexible ...

Get Sams Teach Yourself Ruby in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.