[arch-general] renice Bash at login

Leonidas Spyropoulos artafinde at gmail.com
Mon Apr 23 15:27:15 EDT 2012


On Mon, Apr 23, 2012 at 7:27 PM, Mauro Santos
<registo.mailling at gmail.com> wrote:
> 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

Thanks that will do probably.

>
> --
> Mauro Santos


-- 
Caution: breathing may be hazardous to your health.

#include <stdio.h>
int main(){printf("%s","\x4c\x65\x6f\x6e\x69\x64\x61\x73");}


More information about the arch-general mailing list