管理进程的实时属性:sets or retrieves the real-time scheduling attributes of an existing PID or runs COMMAND with the given attributes. Both
policy (one of SCHED_OTHER, SCHED_FIFO, SCHED_RR, or SCHED_BATCH) and priority can be set and retrieved.
PTIONS
-p, --pid
operate on an existing PID and do not launch a new task
-b, --batch
set scheduling policy to SCHED_BATCH
-f, --fifo
set scheduling policy to SCHED_FIFO
-m, --max
show minimum and maximum valid priorities, then exit
-o, --other
set policy scheduling policy to SCHED_OTHER
-r, --rr
set scheduling policy to SCHED_RR (the default)
-h, --help
display usage information and exit
-v, --version
output version information and exit
USAGE
The default behavior is to run a new command::
chrt [prio] [command] [arguments]
You can also retrieve the real-time attributes of an existing task:
chrt -p [pid]
Or set them:
chrt -p [prio] [pid]
举例:
1、chrt -f 50 /usr/mysql/bin/ndb_mgmd --nowait-nodes 2 --disable-config-cache --initial --config-file=/usr/dhafw/data/mysql/config.ini --nodaemon
5863 5863 FF 50 - 90 1 1.4 FF Ssl poll_schedule_ ndb_mgmd
2、chrt -p 30756
pid 30756's current scheduling policy: SCHED_OTHER
pid 30756's current scheduling priority: 0
本文详细介绍了如何使用命令行工具管理进程的实时属性,包括设置和检索调度策略、优先级等关键信息。

1901

被折叠的 条评论
为什么被折叠?



