Re: script which should take who -i output as input and KILL
From: Randy Styka (randy_at_computron.com)
Date: 05/26/04
- Next message: Alan Connor: "Re: script which should take who -i output as input and KILL"
- Previous message: joe_at_invalid.address: "Re: Unix directories as lexical scopes?"
- In reply to: Khurram Khan: "script which should take who -i output as input and KILL"
- Next in thread: Alan Connor: "Re: script which should take who -i output as input and KILL"
- Reply: Alan Connor: "Re: script which should take who -i output as input and KILL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 26 May 2004 03:32:35 GMT
Khurram Khan wrote:
>
> Hi all,
>
> I want to write a script which should take who -i output as input and
> KILL all the sessions which are idle since more then 30 minutes,
> however if user is root then script should not kill its session.
>
One thing to watch out for is the definition of idle that is
used by "who -i" or "who -u". These programs only look at
the last access of the tty device. Which means that if a user
is running a long cpu bound job with no keyboard activity,
they WILL show up as idle in these commands and you will log
them off...
To avoid this, you need to monitor cpu usage. Because of this,
we wrote (and sell) a package called LOGMON that monitors the
cpu usage for each user and their child processes. We can then
log off the truly idle users. You can vary the inactivity time
by user, time of day, etc. For details send a message to
logmon@computron.com or visit www.logmon.com
Good luck...
-- +-----------------------------------------------------------------+ | Computronics Randy Styka, randy@computron.com | | 4N165 Wood Dale Road Phone: 630/941-7767 | | Addison, Illinois 60101 USA Fax: 630/941-7714 | +-----------------------------------------------------------------+
- Next message: Alan Connor: "Re: script which should take who -i output as input and KILL"
- Previous message: joe_at_invalid.address: "Re: Unix directories as lexical scopes?"
- In reply to: Khurram Khan: "script which should take who -i output as input and KILL"
- Next in thread: Alan Connor: "Re: script which should take who -i output as input and KILL"
- Reply: Alan Connor: "Re: script which should take who -i output as input and KILL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|