← 返回命令列表

Linux command

renice 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Set the absolute priority of a running process

renice -n [3] -p [pid]

Increase the priority of a running process

sudo renice -n [-4] -p [pid]

Decrease the priority of all processes owned by a user

renice -n [4] -u [user]

Set the priority of all processes in a process group

sudo renice -n [-5] -g [process_group]

说明

renice alters the scheduling priority (niceness) of running processes. Niceness values range from -20 (highest priority, most favorable to the process) to 19 (lowest priority, least favorable). Regular users can only increase niceness (lower priority) of their own processes. The superuser can decrease niceness (raise priority) and modify any process.

参数

-n _priority_
Specify the scheduling priority to set. Values range from -20 (highest) to 19 (lowest).
-p _pid_
Interpret arguments as process IDs (default).
-u _user_
Interpret arguments as usernames or UIDs.
-g _pgrp_
Interpret arguments as process group IDs.

FAQ

What is the renice command used for?

renice alters the scheduling priority (niceness) of running processes. Niceness values range from -20 (highest priority, most favorable to the process) to 19 (lowest priority, least favorable). Regular users can only increase niceness (lower priority) of their own processes. The superuser can decrease niceness (raise priority) and modify any process.

How do I run a basic renice example?

Run `renice -n [3] -p [pid]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -n _priority_ do in renice?

Specify the scheduling priority to set. Values range from -20 (highest) to 19 (lowest).