23 Apr
2012
23 Apr
'12
6:27 p.m.
On 23-04-2012 19:03, Leonidas Spyropoulos wrote:
Can you share the script please?
-- Mauro Santos
For arch it would be something like this: #!/bin/bash renice 15 `ps axo "bsdtime,euid,pid,nice,%cpu,comm" | sed 's/:..//' | awk '{if ($2 >= 1000 && $1 > 30 && $5 > 80 && $4 < 15 ) print $3}'` The script should be only two lines long (the shebang + command). Name it whatever you like, put it inside /etc/cron.hourly and make sure it is executable. I guess it's not pretty but gets the job done :p -- Mauro Santos