1CHRT(1) User Commands CHRT(1)
2
3
4
6 chrt - manipulate the real-time attributes of a process
7
9 chrt [options] priority command [argument...]
10 chrt [options] -p [priority] pid
11
13 chrt sets or retrieves the real-time scheduling attributes of an exist‐
14 ing pid, or runs command with the given attributes.
15
16
18 -o, --other
19 Set scheduling policy to SCHED_OTHER. This is the default Linux
20 scheduling policy.
21
22 -f, --fifo
23 Set scheduling policy to SCHED_FIFO.
24
25 -r, --rr
26 Set scheduling policy to SCHED_RR. When no policy is defined,
27 the SCHED_RR is used as the default.
28
29 -b, --batch
30 Set scheduling policy to SCHED_BATCH (Linux-specific, supported
31 since 2.6.16). The priority argument has to be set to zero.
32
33 -i, --idle
34 Set scheduling policy to SCHED_IDLE (Linux-specific, supported
35 since 2.6.23). The priority argument has to be set to zero.
36
37 -d, --deadline
38 Set scheduling policy to SCHED_DEADLINE (Linux-specific, sup‐
39 ported since 3.14). The priority argument has to be set to
40 zero. See also --sched-runtime, --sched-deadline and
41 --sched-period. The relation between the options required by
42 the kernel is runtime <= deadline <= period. chrt copies period
43 to deadline if --sched-deadline is not specified and deadline to
44 runtime if --sched-runtime is not specified. It means that at
45 least --sched-period has to be specified. See sched(7) for more
46 details.
47
48
50 -T, --sched-runtime nanoseconds
51 Specifies runtime parameter for SCHED_DEADLINE policy (Linux-
52 specific).
53
54 -P, --sched-period nanoseconds
55 Specifies period parameter for SCHED_DEADLINE policy (Linux-spe‐
56 cific).
57
58 -D, --sched-deadline nanoseconds
59 Specifies deadline parameter for SCHED_DEADLINE policy (Linux-
60 specific).
61
62 -R, --reset-on-fork
63 Add SCHED_RESET_ON_FORK flag to the SCHED_FIFO or SCHED_RR
64 scheduling policy (Linux-specific, supported since 2.6.31).
65
66
68 -a, --all-tasks
69 Set or retrieve the scheduling attributes of all the tasks
70 (threads) for a given PID.
71
72 -m, --max
73 Show minimum and maximum valid priorities, then exit.
74
75 -p, --pid
76 Operate on an existing PID and do not launch a new task.
77
78 -v, --verbose
79 Show status information.
80
81 -V, --version
82 Display version information and exit.
83
84 -h, --help
85 Display help text and exit.
86
88 The default behavior is to run a new command:
89 chrt priority command [arguments]
90
91 You can also retrieve the real-time attributes of an existing task:
92 chrt -p pid
93
94 Or set them:
95 chrt -r -p priority pid
96
98 A user must possess CAP_SYS_NICE to change the scheduling attributes of
99 a process. Any user can retrieve the scheduling information.
100
101
103 Only SCHED_FIFO, SCHED_OTHER and SCHED_RR are part of POSIX 1003.1b
104 Process Scheduling. The other scheduling attributes may be ignored on
105 some systems.
106
107 Linux' default scheduling policy is SCHED_OTHER.
108
110 Robert Love ⟨rml@tech9.net⟩
111 Karel Zak ⟨kzak@redhat.com⟩
112
114 nice(1), renice(1), taskset(1), sched(7)
115
116 See sched_setscheduler(2) for a description of the Linux scheduling
117 scheme.
118
120 The chrt command is part of the util-linux package and is available
121 from https://www.kernel.org/pub/linux/utils/util-linux/.
122
123
124
125util-linux January 2016 CHRT(1)