table of contents
CHRT(1) | User Commands | CHRT(1) |
NAME¶
chrt - manipulate the real-time attributes of a process
SYNOPSIS¶
chrt [options] priority command argument ...
chrt [options] -p [priority] PID
DESCRIPTION¶
chrt sets or retrieves the real-time scheduling attributes of an existing PID, or runs command with the given attributes.
POLICIES¶
-o, --other
-f, --fifo
-r, --rr
-b, --batch
-i, --idle
-d, --deadline
SCHEDULING OPTIONS¶
-T, --sched-runtime nanoseconds
-P, --sched-period nanoseconds
-D, --sched-deadline nanoseconds
-R, --reset-on-fork
Each thread has a reset-on-fork scheduling flag. When this flag is set, children created by fork(2) do not inherit privileged scheduling policies. After the reset-on-fork flag has been enabled, it can be reset only if the thread has the CAP_SYS_NICE capability. This flag is disabled in child processes created by fork(2).
More precisely, if the reset-on-fork flag is set, the following rules apply for subsequently created children:
OPTIONS¶
-a, --all-tasks
-m, --max
-p, --pid
-v, --verbose
-V, --version
-h, --help
USAGE¶
The default behavior is to run a new command:
You can also retrieve the real-time attributes of an existing task:
Or set them:
PERMISSIONS¶
A user must possess CAP_SYS_NICE to change the scheduling attributes of a process. Any user can retrieve the scheduling information.
NOTES¶
Only SCHED_FIFO, SCHED_OTHER and SCHED_RR are part of POSIX 1003.1b Process Scheduling. The other scheduling attributes may be ignored on some systems.
Linux' default scheduling policy is SCHED_OTHER.
AUTHORS¶
Robert Love <rml@tech9.net>, Karel Zak <kzak@redhat.com>
SEE ALSO¶
nice(1), renice(1), taskset(1), sched(7)
See sched_setscheduler(2) for a description of the Linux scheduling scheme.
REPORTING BUGS¶
For bug reports, use the issue tracker at <https://github.com/karelzak/util-linux/issues>.
AVAILABILITY¶
The chrt command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.
2022-02-14 | util-linux 2.37.4 |