Re: renice Bash at login

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux