stupid question of the day: how do i check every second or two for processes that are using above a certain amount of cpu and kill -9 them as fast as possible Sounds potentially dangerous... But no doubt you could use top and awk to get the top couple of processess' PIDs and kill 'em. I hope your process killer doesn't use too much CPU mkb_: lol, it would simply end up killing itself if it did use too much CPU lol brycec: it'll basically be something like ps aux | grep SPECIFIC_PROGRAM_STRING shouldnt have any collateral damage why do you want to do this? I fear that unless your process is limited by I/O or something, it will be using either no CPU or all of it I can see the utility if you're looking for runaway processes, something that's been running for a few minutes chweing up CPU... I myself monitor those and receive email alerts, but there is no automatic action. (eg when running a full backup, my alerts are set off, but it's harmless and I don't kill the backup) If you're looking for that, there's a plugin distributed with munin-node that does just that -- IIRC, if the same process is running high for 2 or more consecutive runs (in other words, for at least 5 minutes), then it sends the alert CPU time limits are an option too, but you have to be careful to exclude long-running stuff Start by excluding uid=0 ;p