2015-12-29 10:22:16 +05:30
|
|
|
# renice
|
|
|
|
|
2024-01-25 02:28:11 -03:00
|
|
|
> Alter the scheduling priority/niceness of running processes.
|
2019-07-11 02:42:27 +02:00
|
|
|
> Niceness values range from -20 (most favorable to the process) to 19 (least favorable to the process).
|
2024-01-09 18:18:23 -03:00
|
|
|
> See also: `nice`.
|
2021-10-13 11:22:50 +05:00
|
|
|
> More information: <https://manned.org/renice>.
|
2015-12-29 10:22:16 +05:30
|
|
|
|
2025-03-22 08:37:12 +02:00
|
|
|
- Set the absolute priority of a running process:
|
2015-12-29 10:22:16 +05:30
|
|
|
|
2025-03-22 08:37:12 +02:00
|
|
|
`renice --priority {{3}} {{[-p|--pid]}} {{pid}}`
|
2015-12-29 10:22:16 +05:30
|
|
|
|
2025-03-22 08:37:12 +02:00
|
|
|
- Increase the priority of a running process:
|
2015-12-29 10:22:16 +05:30
|
|
|
|
2025-03-22 08:37:12 +02:00
|
|
|
`sudo renice --relative {{-4}} {{[-p|--pid]}} {{pid}}`
|
2015-12-29 10:22:16 +05:30
|
|
|
|
2025-03-22 08:37:12 +02:00
|
|
|
- Decrease the priority of all processes owned by a user:
|
2015-12-29 10:22:16 +05:30
|
|
|
|
2025-03-22 08:37:12 +02:00
|
|
|
`renice --relative {{4}} {{[-u|--user]}} {{uid|user}}`
|
|
|
|
|
|
|
|
- Set the priority of all processes that belong to a process group:
|
|
|
|
|
|
|
|
`sudo renice {{-5}} {{[-g|--pgrp]}} {{process_group}}`
|