in reply to Killing multiple logins.

who might be useful.
Run 'who -u' and parse the output; e.g., use 'login time' or 'idle time'. Then kill() unneeded sessions.

--perlplexer

Replies are listed 'Best First'.
Re: Re: Killing multiple logins.
by badblk (Monk) on Apr 24, 2002 at 11:41 UTC
    I have the same problems on my servers at work (SCO 5.0.5) and quite a while ago I created a small shell script to deal with the problem. You could write this is perl as well but I see no point to it. This works in straight sh so you should be fine with it anywhere. The below code has had the checking part of it removed for brevity.
    #!/bin/sh port=$1 kill -9 `ps -ft$port | sed '1d' | awk '{print $2}'