[arch-general] renice Bash at login
Mauro Santos
registo.mailling at gmail.com
Mon Apr 23 14:27:21 EDT 2012
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
More information about the arch-general
mailing list