How to identify an idle process? 
Author Message
 How to identify an idle process?

I want to set up a script to kill any process that is idle for more
than a specified time. How can I identify an idle process, and how
long it is idle?

Thanks



Sun, 06 Jun 2004 06:06:49 GMT
 How to identify an idle process?

Just had a look at my system, and there's this process "swapper" that
doesn't seem to be doing much.  And all these "oninit" processes look idle
too.  Think I'll nuke 'em.

You're asking for trouble, matey!


Quote:

> I want to set up a script to kill any process that is idle for more
> than a specified time. How can I identify an idle process, and how
> long it is idle?

> Thanks



Sun, 06 Jun 2004 07:06:12 GMT
 How to identify an idle process?
On Tue, 18 Dec 2001 23:06:12 -0000, "Neil Truby"

Quote:

>And all these "oninit" processes look idle
>too.  Think I'll nuke 'em.

Blimey, and he moans about the performance on his system...?


Sun, 06 Jun 2004 07:16:01 GMT
 How to identify an idle process?

Quote:

>I want to set up a script to kill any process that is idle for more
>than a specified time. How can I identify an idle process, and how
>long it is idle?

>Thanks

In a shell script, pipe the output of the 'who -u" command thru a cut to
get the time field that represents the last I/O time and the process
number right next to it.  Set up a condition to test the time for a
maximum value, then issue a polite kill -1 to the process id.  Make sure
not to kill any informix login or oninit process or you will surely
crash the engine.

---dwk



Wed, 09 Jun 2004 09:13:46 GMT
 
 [ 4 post ] 

 Relevant Pages 

1. Identifying and killing idle threads

2. ! Auto Killing of Idle Processes

3. kill idle process

4. kill idle process automaticaly

5. kill idle process automaticaly

6. kill idle process

7. too many idle processes

8. postgres idle process and other problems

9. many idle processes

10. process idle

11. process last non-idle time : Stat in v$sesstat(#14)

12. Killing idle user processes ?


 
Powered by phpBB® Forum Software