Dit deel is nog niet vertaald. Je ziet de Engelse tekst.
Wat het doet
renice -n VALUE -p PID sets the new nice value of a running process. With -u USER it changes all processes of a user. Normal users can only make their own processes nicer; root can do anything.
Zo schrijf je het
renice [-n] PRIORITY [-g|-p|-u] ID...
renice --relative N [-g|-p|-u] ID...Opties 7
Meest gebruikt
Niets past bij dit filter.
Voorbeelden 10
$ als gewone gebruiker# als root (of met sudo)
1Make a process nicer
renice -n 10 -p 4123 4123 (process ID) old priority 0, new priority 10It now gives way to other processes.
2Give a process more priority (root)
renice -n -10 -p $(pidof myapp)Only root may lower the value.
3All processes of a user
renice -n 15 -u lisaA user with heavy jobs slows others less.
4Normal user tries to go back
renice -n 0 -p 4123 renice: failed to set priority for 4123 (process ID): Permission deniedUsers cannot raise their own priority again.
5Add to the current value
renice --relative 5 -p 4123From 10 to 15.
6Several processes at once
renice -n 5 -p $(pgrep -d ' ' dd)All dd processes.
7Change a whole process group
renice -n 10 -g 4120A pipeline started together.
8From top
Press r, type the PID and the new value.
9Check the result
ps -o pid,ni,cmd -p 4123Column NI.
10Slow down a crypto miner while you investigate (security)
renice -n 19 -p 6666; kill -STOP 6666Stop it first, then collect evidence before you kill it.
Niets past bij dit filter.
Exitcodes
0 :: Done. 1 :: Error.