]>
Commit | Line | Data |
---|---|---|
48d7b13a KZ |
1 | .\" chrt(1) manpage |
2 | .\" | |
3 | .\" Copyright (C) 2004 Robert Love | |
4 | .\" | |
5 | .\" This is free documentation; you can redistribute it and/or | |
6 | .\" modify it under the terms of the GNU General Public License as | |
7 | .\" published by the Free Software Foundation; either version 2 of | |
8 | .\" the License. | |
9 | .\" | |
10 | .\" The GNU General Public License's references to "object code" | |
11 | .\" and "executables" are to be interpreted as the output of any | |
12 | .\" document formatting or typesetting system, including | |
13 | .\" intermediate and printed output. | |
14 | .\" | |
15 | .\" This manual is distributed in the hope that it will be useful, | |
16 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | .\" GNU General Public License for more details. | |
19 | .\" | |
20 | .\" You should have received a copy of the GNU General Public | |
21 | .\" License along with this manual; if not, write to the Free | |
22 | .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, | |
23 | .\" USA. | |
24 | .\" | |
25 | .\" 2002-05-11 Robert Love <rml@tech9.net> | |
26 | .\" Initial version | |
27 | .\" | |
5f719971 | 28 | .TH CHRT "1" "June 2010" "schedutils" "Linux User's Manual" |
48d7b13a KZ |
29 | .SH NAME |
30 | chrt \- manipulate real-time attributes of a process | |
31 | .SH SYNOPSIS | |
32 | .B chrt | |
5ebbcdf9 LJ |
33 | .RI [ options ]\ prio |
34 | .IR command\ [ arg ]... | |
35 | .br | |
36 | .B chrt | |
37 | .RI [ options ] | |
38 | .B \-p | |
39 | .RI [ prio ]\ pid | |
48d7b13a KZ |
40 | .SH DESCRIPTION |
41 | .PP | |
42 | .BR chrt (1) | |
5f719971 | 43 | sets or retrieves the real-time scheduling attributes of an existing PID, or |
48d7b13a | 44 | runs COMMAND with the given attributes. Both policy (one of |
df3773fb | 45 | .BR SCHED_OTHER , |
48d7b13a KZ |
46 | .BR SCHED_FIFO , |
47 | .BR SCHED_RR , | |
c779d6e9 | 48 | .BR SCHED_BATCH , |
48d7b13a | 49 | or |
c779d6e9 | 50 | .BR SCHED_IDLE ) |
48d7b13a | 51 | and priority can be set and retrieved. |
09dd84ca KZ |
52 | .PP |
53 | The | |
54 | .BR SCHED_BATCH | |
c779d6e9 MS |
55 | policy is supported since Linux 2.6.16. The |
56 | .BR SCHED_IDLE | |
57 | policy is supported since Linux 2.6.23. | |
cdfb1e88 KZ |
58 | .PP |
59 | The | |
60 | .BR SCHED_RESET_ON_FORK | |
61 | flag for policies SCHED_RR and SCHED_FIFO is supported | |
62 | since Linux 2.6.31. | |
48d7b13a KZ |
63 | .SH OPTIONS |
64 | .TP | |
65 | .B -p, --pid | |
66 | operate on an existing PID and do not launch a new task | |
df3773fb KZ |
67 | .TP |
68 | .B -b, --batch | |
69 | set scheduling policy to | |
70 | .BR SCHED_BATCH | |
b64279da | 71 | (Linux specific) |
48d7b13a KZ |
72 | .TP |
73 | .B -f, --fifo | |
74 | set scheduling policy to | |
75 | .BR SCHED_FIFO | |
76 | .TP | |
c779d6e9 | 77 | .B -i, --idle |
cdc1ae5f | 78 | set scheduling policy to |
c779d6e9 | 79 | .BR SCHED_IDLE |
b64279da | 80 | (Linux specific) |
c779d6e9 | 81 | .TP |
48d7b13a KZ |
82 | .B -m, --max |
83 | show minimum and maximum valid priorities, then exit | |
84 | .TP | |
85 | .B -o, --other | |
86 | set policy scheduling policy to | |
87 | .BR SCHED_OTHER | |
88 | .TP | |
89 | .B -r, --rr | |
90 | set scheduling policy to | |
91 | .BR SCHED_RR | |
92 | (the default) | |
93 | .TP | |
5f719971 BS |
94 | .B -R, --reset-on-fork |
95 | add | |
96 | .B SCHED_RESET_ON_FORK | |
97 | flag to the | |
98 | .B SCHED_FIFO | |
99 | or | |
100 | .B SCHED_RR | |
101 | scheduling policy (Linux specific) | |
102 | .TP | |
103 | .B -v, --verbose | |
104 | show status information | |
105 | .TP | |
48d7b13a KZ |
106 | .B -h, --help |
107 | display usage information and exit | |
108 | .TP | |
5f719971 BS |
109 | .B -V, --version |
110 | display version information and exit | |
48d7b13a KZ |
111 | .SH USAGE |
112 | .TP | |
113 | The default behavior is to run a new command:: | |
697d58e8 | 114 | chrt prio command [arguments] |
48d7b13a KZ |
115 | .TP |
116 | You can also retrieve the real-time attributes of an existing task: | |
697d58e8 | 117 | chrt -p pid |
48d7b13a KZ |
118 | .TP |
119 | Or set them: | |
697d58e8 | 120 | chrt -p prio pid |
48d7b13a KZ |
121 | .SH PERMISSIONS |
122 | A user must possess | |
123 | .BR CAP_SYS_NICE | |
124 | to change the scheduling attributes of a process. Any user can retrieve the | |
125 | scheduling information. | |
40bc2ab5 AJ |
126 | .SH NOTES |
127 | Only | |
128 | .BR SCHED_FIFO , | |
129 | .BR SCHED_OTHER | |
130 | and | |
131 | .BR SCHED_RR | |
132 | are part of POSIX 1003.1b Process Scheduling. The other scheduling attributes | |
133 | may be ignored on some systems. | |
48d7b13a KZ |
134 | .SH AUTHOR |
135 | Written by Robert M. Love. | |
48d7b13a KZ |
136 | .SH COPYRIGHT |
137 | Copyright \(co 2004 Robert M. Love | |
138 | .br | |
139 | This is free software; see the source for copying conditions. There is NO | |
140 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
141 | .SH "SEE ALSO" | |
142 | .BR taskset (1), | |
143 | .BR nice (1), | |
144 | .BR renice (1) | |
145 | .sp | |
146 | See | |
147 | .BR sched_setscheduler (2) | |
148 | for a description of the Linux scheduling scheme. | |
86d62711 | 149 | .SH AVAILABILITY |
601d12fb KZ |
150 | The chrt command is part of the util-linux package and is available from |
151 | ftp://ftp.kernel.org/pub/linux/utils/util-linux/. |