]> git.ipfire.org Git - thirdparty/util-linux.git/blame - schedutils/chrt.1
docs: update ReleaseNotes: fix typo in v2.20-ReleaseNotes
[thirdparty/util-linux.git] / schedutils / chrt.1
CommitLineData
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
30chrt \- 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
397a5114
BS
42.BR chrt
43sets or retrieves the real-time scheduling attributes of an existing \fIpid\fR,
44or runs \fIcommand\fR 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 49or
c779d6e9 50.BR SCHED_IDLE )
48d7b13a 51and priority can be set and retrieved.
09dd84ca
KZ
52.PP
53The
54.BR SCHED_BATCH
397a5114 55policy is supported since Linux 2.6.16. The
c779d6e9
MS
56.BR SCHED_IDLE
57policy is supported since Linux 2.6.23.
cdfb1e88
KZ
58.PP
59The
60.BR SCHED_RESET_ON_FORK
61flag for policies SCHED_RR and SCHED_FIFO is supported
62since Linux 2.6.31.
48d7b13a
KZ
63.SH OPTIONS
64.TP
78904e76 65.B -a, --all-tasks
397a5114 66Set or retrieve the scheduling attributes of all the tasks (threads) for a
503cbbe1 67given PID.
78904e76 68.TP
df3773fb 69.B -b, --batch
397a5114 70Set scheduling policy to
df3773fb 71.BR SCHED_BATCH
397a5114 72(Linux specific).
48d7b13a
KZ
73.TP
74.B -f, --fifo
397a5114
BS
75Set scheduling policy to
76.BR SCHED_FIFO .
48d7b13a 77.TP
c779d6e9 78.B -i, --idle
397a5114 79Set scheduling policy to
c779d6e9 80.BR SCHED_IDLE
397a5114 81(Linux specific).
c779d6e9 82.TP
48d7b13a 83.B -m, --max
397a5114 84Show minimum and maximum valid priorities, then exit.
48d7b13a
KZ
85.TP
86.B -o, --other
397a5114
BS
87Set policy scheduling policy to
88.BR SCHED_OTHER .
89.TP
90.B -p, --pid
91Operate on an existing PID and do not launch a new task.
48d7b13a
KZ
92.TP
93.B -r, --rr
397a5114 94Set scheduling policy to
48d7b13a 95.BR SCHED_RR
397a5114 96(the default).
48d7b13a 97.TP
5f719971 98.B -R, --reset-on-fork
397a5114 99Add
5f719971
BS
100.B SCHED_RESET_ON_FORK
101flag to the
102.B SCHED_FIFO
103or
104.B SCHED_RR
397a5114 105scheduling policy (Linux specific).
5f719971
BS
106.TP
107.B -v, --verbose
397a5114 108Show status information.
5f719971 109.TP
48d7b13a 110.B -h, --help
397a5114 111Display usage information and exit.
48d7b13a 112.TP
5f719971 113.B -V, --version
397a5114 114Display version information and exit.
48d7b13a
KZ
115.SH USAGE
116.TP
397a5114
BS
117The default behavior is to run a new command:
118.B chrt
119.I prio
120.IR command\ [ arguments ]
48d7b13a
KZ
121.TP
122You can also retrieve the real-time attributes of an existing task:
397a5114
BS
123.B chrt \-p
124.I pid
48d7b13a
KZ
125.TP
126Or set them:
397a5114
BS
127.B chrt \-p
128.I prio pid
48d7b13a
KZ
129.SH PERMISSIONS
130A user must possess
131.BR CAP_SYS_NICE
132to change the scheduling attributes of a process. Any user can retrieve the
133scheduling information.
40bc2ab5
AJ
134.SH NOTES
135Only
136.BR SCHED_FIFO ,
137.BR SCHED_OTHER
138and
139.BR SCHED_RR
140are part of POSIX 1003.1b Process Scheduling. The other scheduling attributes
141may be ignored on some systems.
48d7b13a
KZ
142.SH AUTHOR
143Written by Robert M. Love.
48d7b13a
KZ
144.SH COPYRIGHT
145Copyright \(co 2004 Robert M. Love
146.br
147This is free software; see the source for copying conditions. There is NO
148warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
149.SH "SEE ALSO"
150.BR taskset (1),
151.BR nice (1),
152.BR renice (1)
153.sp
154See
155.BR sched_setscheduler (2)
156for a description of the Linux scheduling scheme.
86d62711 157.SH AVAILABILITY
601d12fb
KZ
158The chrt command is part of the util-linux package and is available from
159ftp://ftp.kernel.org/pub/linux/utils/util-linux/.