1CHRT(1)                          User Commands                         CHRT(1)
2
3
4

NAME

6       chrt - manipulate the real-time attributes of a process
7

SYNOPSIS

9       chrt [options] priority command argument ...
10
11       chrt [options] -p [priority] PID
12

DESCRIPTION

14       chrt sets or retrieves the real-time scheduling attributes of an
15       existing PID, or runs command with the given attributes.
16

POLICIES

18       -o, --other
19           Set scheduling policy to SCHED_OTHER (time-sharing scheduling).
20           This is the default Linux scheduling policy.
21
22       -f, --fifo
23           Set scheduling policy to SCHED_FIFO (first in-first out).
24
25       -r, --rr
26           Set scheduling policy to SCHED_RR (round-robin scheduling). When no
27           policy is defined, the SCHED_RR is used as the default.
28
29       -b, --batch
30           Set scheduling policy to SCHED_BATCH (scheduling batch processes).
31           Linux-specific, supported since 2.6.16. The priority argument has
32           to be set to zero.
33
34       -i, --idle
35           Set scheduling policy to SCHED_IDLE (scheduling very low priority
36           jobs). Linux-specific, supported since 2.6.23. The priority
37           argument has to be set to zero.
38
39       -d, --deadline
40           Set scheduling policy to SCHED_DEADLINE (sporadic task model
41           deadline scheduling). Linux-specific, supported since 3.14. The
42           priority argument has to be set to zero. See also --sched-runtime,
43           --sched-deadline and --sched-period. The relation between the
44           options required by the kernel is runtime ⇐ deadline ⇐ period. chrt
45           copies period to deadline if --sched-deadline is not specified and
46           deadline to runtime if --sched-runtime is not specified. It means
47           that at least --sched-period has to be specified. See sched(7) for
48           more details.
49

SCHEDULING OPTIONS

51       -T, --sched-runtime nanoseconds
52           Specifies runtime parameter for SCHED_DEADLINE policy
53           (Linux-specific).
54
55       -P, --sched-period nanoseconds
56           Specifies period parameter for SCHED_DEADLINE policy
57           (Linux-specific).
58
59       -D, --sched-deadline nanoseconds
60           Specifies deadline parameter for SCHED_DEADLINE policy
61           (Linux-specific).
62
63       -R, --reset-on-fork
64           Use SCHED_RESET_ON_FORK or SCHED_FLAG_RESET_ON_FORK flag.
65           Linux-specific, supported since 2.6.31.
66
67       Each thread has a reset-on-fork scheduling flag. When this flag is set,
68       children created by fork(2) do not inherit privileged scheduling
69       policies. After the reset-on-fork flag has been enabled, it can be
70       reset only if the thread has the CAP_SYS_NICE capability. This flag is
71       disabled in child processes created by fork(2).
72
73       More precisely, if the reset-on-fork flag is set, the following rules
74       apply for subsequently created children:
75
76       •   If the calling thread has a scheduling policy of SCHED_FIFO or
77           SCHED_RR, the policy is reset to SCHED_OTHER in child processes.
78
79       •   If the calling process has a negative nice value, the nice value is
80           reset to zero in child processes.
81

OPTIONS

83       -a, --all-tasks
84           Set or retrieve the scheduling attributes of all the tasks
85           (threads) for a given PID.
86
87       -m, --max
88           Show minimum and maximum valid priorities, then exit.
89
90       -p, --pid
91           Operate on an existing PID and do not launch a new task.
92
93       -v, --verbose
94           Show status information.
95
96       -h, --help
97           Display help text and exit.
98
99       -V, --version
100           Print version and exit.
101

USAGE

103       The default behavior is to run a new command:
104           chrt priority command [arguments]
105
106       You can also retrieve the real-time attributes of an existing task:
107           chrt -p PID
108
109       Or set them:
110           chrt -r -p priority PID
111

PERMISSIONS

113       A user must possess CAP_SYS_NICE to change the scheduling attributes of
114       a process. Any user can retrieve the scheduling information.
115

NOTES

117       Only SCHED_FIFO, SCHED_OTHER and SCHED_RR are part of POSIX 1003.1b
118       Process Scheduling. The other scheduling attributes may be ignored on
119       some systems.
120
121       Linux' default scheduling policy is SCHED_OTHER.
122

AUTHORS

124       Robert Love <rml@tech9.net>, Karel Zak <kzak@redhat.com>
125

SEE ALSO

127       nice(1), renice(1), taskset(1), sched(7)
128
129       See sched_setscheduler(2) for a description of the Linux scheduling
130       scheme.
131

REPORTING BUGS

133       For bug reports, use the issue tracker at
134       https://github.com/util-linux/util-linux/issues.
135

AVAILABILITY

137       The chrt command is part of the util-linux package which can be
138       downloaded from Linux Kernel Archive
139       <https://www.kernel.org/pub/linux/utils/util-linux/>.
140
141
142
143util-linux 2.38.1                 2022-05-11                           CHRT(1)
Impressum