Page 1 of 1

high proccess limits

Posted: 30 Apr 2011, 09:08
by souperman
There's already a way to limit the number of process. I would recommend a way to limit the number of high process based on an interval.

For example:
A variable to determine when to monitor a process. Lets call it PT_High_Load
A variable to determine how often to check the PT_High_CPU processes. Lets call it PT_High_Time
A variable to determine if the user wants to kill the process or not

So if PT_High_CPU is 5, that means that any process that's higher than 5% cpu will be killed if it's logged again. So if a process under a user is using more than 5% cpu then it will be killed if it's still using more than 5% when CSF checks for high process again based on the PT_High_Time value.

To be more clear....
PT_High_CPU = 5
PT_High_Time = 60 (seconds)
PT_High_Kill = 1

processes running on first pass w/ cpu usage:
root 1%
root 1%
nobody 2%
nobody 2%
usera 10%

so when CSF does its first pass, usera will be recorded and not killed...on the next pass (60 seconds, based on the PT_High_Time value), if usera (based on pid of course) is still using more than 5% cpu (based on the PT_High_CPU value), it will be killed if PT_High_Kill is set to 1.

So what do you think Chirpy?

Re: high proccess limits

Posted: 23 May 2011, 10:15
by chirpy
It's an interesting idea. I'll have a think about it, but cannot make any promises.