SUMMARY: killing off idle processes

From: Jon J. Brewster (
Date: Mon Jul 09 1990 - 11:20:48 CDT

I wrote:

> I'm considering terminating idle processes after a given length of
> time via cron script. Is there any particular caveat anyone has to
> offer about doing this, or a reason not to do it at all?

The advice I got was:

1) Be careful how "idle" is determined. One would not want to terminate daemons, for example, or long - running batch jobs. Other jobs which may seem to be idle are login shells on workstations where the windowing system is in use and windows which are dormant, such as the console.

2) Be careful what resources the process has "grabbed". Examples given were tape drives and modems. The potential problem is hanging the device.

3) Be careful how one terminates the idle process. Suggested steps were sending a warning to the user, perhaps via write(1), and then sending a sequence of signals so that the process is given a chance to exit gracefully. The suggested sequence was SIGXCPU, SIGHUP and then SIGKILL.

4) Lastly, a log file of all such terminations is recommended to facilitate investigation of complaints.

Thanks to: Russell Brand <wuthel!> Mark Ferraretto <> "Fuat C. Baran" <>

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:05:58 CDT