]>
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 | .\" | |
7cebf0bb SK |
20 | .\" You should have received a copy of the GNU General Public License along |
21 | .\" with this program; if not, write to the Free Software Foundation, Inc., | |
22 | .\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
48d7b13a KZ |
23 | .\" |
24 | .\" 2002-05-11 Robert Love <rml@tech9.net> | |
25 | .\" Initial version | |
26 | .\" | |
232dc924 | 27 | .TH CHRT 1 "June 2010" "util-linux" "User Commands" |
48d7b13a | 28 | .SH NAME |
232dc924 | 29 | chrt \- manipulate the real-time attributes of a process |
48d7b13a KZ |
30 | .SH SYNOPSIS |
31 | .B chrt | |
5ebbcdf9 LJ |
32 | .RI [ options ]\ prio |
33 | .IR command\ [ arg ]... | |
34 | .br | |
35 | .B chrt | |
36 | .RI [ options ] | |
37 | .B \-p | |
38 | .RI [ prio ]\ pid | |
48d7b13a KZ |
39 | .SH DESCRIPTION |
40 | .PP | |
232dc924 | 41 | .B chrt |
397a5114 BS |
42 | sets or retrieves the real-time scheduling attributes of an existing \fIpid\fR, |
43 | or runs \fIcommand\fR with the given attributes. Both policy (one of | |
df3773fb | 44 | .BR SCHED_OTHER , |
48d7b13a KZ |
45 | .BR SCHED_FIFO , |
46 | .BR SCHED_RR , | |
c779d6e9 | 47 | .BR SCHED_BATCH , |
48d7b13a | 48 | or |
c779d6e9 | 49 | .BR SCHED_IDLE ) |
48d7b13a | 50 | and priority can be set and retrieved. |
09dd84ca KZ |
51 | .PP |
52 | The | |
53 | .BR SCHED_BATCH | |
397a5114 | 54 | policy is supported since Linux 2.6.16. The |
c779d6e9 MS |
55 | .BR SCHED_IDLE |
56 | policy is supported since Linux 2.6.23. | |
cdfb1e88 KZ |
57 | .PP |
58 | The | |
59 | .BR SCHED_RESET_ON_FORK | |
60 | flag for policies SCHED_RR and SCHED_FIFO is supported | |
61 | since Linux 2.6.31. | |
48d7b13a KZ |
62 | .SH OPTIONS |
63 | .TP | |
78904e76 | 64 | .B -a, --all-tasks |
397a5114 | 65 | Set or retrieve the scheduling attributes of all the tasks (threads) for a |
503cbbe1 | 66 | given PID. |
78904e76 | 67 | .TP |
df3773fb | 68 | .B -b, --batch |
397a5114 | 69 | Set scheduling policy to |
df3773fb | 70 | .BR SCHED_BATCH |
397a5114 | 71 | (Linux specific). |
48d7b13a KZ |
72 | .TP |
73 | .B -f, --fifo | |
397a5114 BS |
74 | Set scheduling policy to |
75 | .BR SCHED_FIFO . | |
48d7b13a | 76 | .TP |
c779d6e9 | 77 | .B -i, --idle |
397a5114 | 78 | Set scheduling policy to |
c779d6e9 | 79 | .BR SCHED_IDLE |
397a5114 | 80 | (Linux specific). |
c779d6e9 | 81 | .TP |
48d7b13a | 82 | .B -m, --max |
397a5114 | 83 | Show minimum and maximum valid priorities, then exit. |
48d7b13a KZ |
84 | .TP |
85 | .B -o, --other | |
397a5114 BS |
86 | Set policy scheduling policy to |
87 | .BR SCHED_OTHER . | |
88 | .TP | |
89 | .B -p, --pid | |
90 | Operate on an existing PID and do not launch a new task. | |
48d7b13a KZ |
91 | .TP |
92 | .B -r, --rr | |
397a5114 | 93 | Set scheduling policy to |
48d7b13a | 94 | .BR SCHED_RR |
397a5114 | 95 | (the default). |
48d7b13a | 96 | .TP |
5f719971 | 97 | .B -R, --reset-on-fork |
397a5114 | 98 | Add |
5f719971 BS |
99 | .B SCHED_RESET_ON_FORK |
100 | flag to the | |
101 | .B SCHED_FIFO | |
102 | or | |
103 | .B SCHED_RR | |
397a5114 | 104 | scheduling policy (Linux specific). |
5f719971 BS |
105 | .TP |
106 | .B -v, --verbose | |
397a5114 | 107 | Show status information. |
5f719971 | 108 | .TP |
48d7b13a | 109 | .B -h, --help |
397a5114 | 110 | Display usage information and exit. |
48d7b13a | 111 | .TP |
5f719971 | 112 | .B -V, --version |
397a5114 | 113 | Display version information and exit. |
48d7b13a KZ |
114 | .SH USAGE |
115 | .TP | |
397a5114 BS |
116 | The default behavior is to run a new command: |
117 | .B chrt | |
118 | .I prio | |
119 | .IR command\ [ arguments ] | |
48d7b13a KZ |
120 | .TP |
121 | You can also retrieve the real-time attributes of an existing task: | |
397a5114 BS |
122 | .B chrt \-p |
123 | .I pid | |
48d7b13a KZ |
124 | .TP |
125 | Or set them: | |
397a5114 BS |
126 | .B chrt \-p |
127 | .I prio pid | |
48d7b13a KZ |
128 | .SH PERMISSIONS |
129 | A user must possess | |
130 | .BR CAP_SYS_NICE | |
131 | to change the scheduling attributes of a process. Any user can retrieve the | |
132 | scheduling information. | |
40bc2ab5 AJ |
133 | .SH NOTES |
134 | Only | |
135 | .BR SCHED_FIFO , | |
136 | .BR SCHED_OTHER | |
137 | and | |
138 | .BR SCHED_RR | |
139 | are part of POSIX 1003.1b Process Scheduling. The other scheduling attributes | |
140 | may be ignored on some systems. | |
48d7b13a KZ |
141 | .SH AUTHOR |
142 | Written by Robert M. Love. | |
48d7b13a KZ |
143 | .SH COPYRIGHT |
144 | Copyright \(co 2004 Robert M. Love | |
145 | .br | |
146 | This is free software; see the source for copying conditions. There is NO | |
147 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
148 | .SH "SEE ALSO" | |
149 | .BR taskset (1), | |
150 | .BR nice (1), | |
151 | .BR renice (1) | |
152 | .sp | |
153 | See | |
154 | .BR sched_setscheduler (2) | |
155 | for a description of the Linux scheduling scheme. | |
86d62711 | 156 | .SH AVAILABILITY |
601d12fb KZ |
157 | The chrt command is part of the util-linux package and is available from |
158 | ftp://ftp.kernel.org/pub/linux/utils/util-linux/. |