日常

ケ・セラ・セラ

nice, renice コマンドの一例

man によると -20 が優先度MAX, 19 が低い。default 10。

Niceness values range from -20 (most favorable to the process) to 19 (least favorable to the process).

こんな風に使う。

$ sleep 10 &
[1] 27388
$ renice -n 10 $!
27388 (process ID) old priority 5, new priority 10
$
[1]  + done       sleep 10
$
$
$ nice -n 10 ls -al > nice.txt &