Results 1 to 8 of 8
Hi,
I would like to know if there is any way to kill the user processes (other than root or su processes) that are idle for more the 10 minutes.
...
- 08-04-2009 #1Just Joined!
- Join Date
- Jul 2009
- Posts
- 14
Automatically Killing the Idle Processes
Hi,
I would like to know if there is any way to kill the user processes (other than root or su processes) that are idle for more the 10 minutes.
Any help would be greatly appreciated.
Thanks,
Prasad
- 08-05-2009 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
You can log a user out if they are idle for more than some period of time, and that will take down any processes associated with their login shell, but I'm not sure about idle processes themselves. I suppose the question one should ask is, why do you need to do this? Other than a process id, after some period of inactivity, the system will swap the process memory to disc if necessary, so it really doesn't take up much in resources.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 08-06-2009 #3Just Joined!
- Join Date
- Jul 2009
- Posts
- 14
Rubberman,
We have a server and several thin clients attached to this in our Office. The OS is RedHat Linux. Whenever n number of applications/programs are opened on each thin client the performance of the server degrades.
Sometimes the users opens the applications which are not necessary and do not close them. This eats up the memory unnecessarily. So I wanted to kill such applications which are not used by the users for some period of time.
Thanks,
Prasad
- 08-06-2009 #4Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
I'm sure there are ways to accomplish this. I just don't know off-hand what they are, though I'd be interested in finding out what you come up with. I'll post here or send you a private message if I come up with a viable solution. I am running CentOS, so whatever I come up with should be valid for RHEL systems.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 08-07-2009 #5Just Joined!
- Join Date
- Jul 2009
- Posts
- 14
Automatically Killing the Idle Processes
Thanks, and will be waiting for your reply.
Prasad
- 10-10-2009 #6Just Joined!
- Join Date
- Jul 2009
- Posts
- 14
Hi Rubberman,
Did you get any Solution? Plz let me know.
Thanks in anticipation,
Prasad
- 10-10-2009 #7Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
Hmmm. Well, idle processes should not be utilizing noticable amounts of CPU, and if you have enough swap space their resident data sets should be swapped to disc, freeing RAM for running processes. If I were you, I would analyze the system activity to see which processes are causing this performance degradation you are seeing. What kind of applications are they running? Are they running a lot of Windows apps under Wine? Do these applications have open database connections?
Anyway, I don't know yet how to timeout user processes in a reasonable manner for your purposes. If I do I'll let you know.Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 10-12-2009 #8Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
After some research, I find that disconnection of users who have been idle for more than some period of time is not too difficult. Your problem, shutting down processes that have been idle, even if the user hasn't been, is more problematic. So far I haven't been able to find anything to do specifically what you want to accomplish. There are ways to determine how much idle time a process has taken, but that's cumulative over the entire time the process has been running, which isn't going to help with your problem.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote