Upload Tizen:Base source
[framework/base/util-linux-ng.git] / schedutils / chrt.1
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 .\"
28 .TH CHRT "1" "Apr 2003" "schedutils" "Linux User's Manual"
29 .SH NAME
30 chrt \- manipulate real-time attributes of a process
31 .SH SYNOPSIS
32 .B chrt
33 .RI [ options ]\  prio
34 .IR command\  [ arg ]...
35 .br
36 .B chrt
37 .RI [ options ]
38 .B \-p
39 .RI [ prio ]\  pid
40 .SH DESCRIPTION
41 .PP
42 .BR chrt (1)
43 sets or retrieves the real-time scheduling attributes of an existing PID or
44 runs COMMAND with the given attributes.  Both policy (one of
45 .BR SCHED_OTHER ,
46 .BR SCHED_FIFO ,
47 .BR SCHED_RR ,
48 .BR SCHED_BATCH ,
49 or
50 .BR SCHED_IDLE )
51 and priority can be set and retrieved.
52 .PP
53 The
54 .BR SCHED_BATCH
55 policy is supported since Linux 2.6.16. The
56 .BR SCHED_IDLE
57 policy is supported since Linux 2.6.23.
58 .SH OPTIONS
59 .TP
60 .B -p, --pid
61 operate on an existing PID and do not launch a new task
62 .TP
63 .B -b, --batch
64 set scheduling policy to
65 .BR SCHED_BATCH
66 (Linux specific)
67 .TP
68 .B -f, --fifo
69 set scheduling policy to
70 .BR SCHED_FIFO
71 .TP
72 .B -i, --idle
73 set schedulng policy to
74 .BR SCHED_IDLE
75 (Linux specific)
76 .TP
77 .B -m, --max
78 show minimum and maximum valid priorities, then exit
79 .TP
80 .B -o, --other
81 set policy scheduling policy to
82 .BR SCHED_OTHER
83 .TP
84 .B -r, --rr
85 set scheduling policy to
86 .BR SCHED_RR
87 (the default)
88 .TP
89 .B -h, --help
90 display usage information and exit
91 .TP
92 .B -v, --version
93 output version information and exit
94 .SH USAGE
95 .TP
96 The default behavior is to run a new command::
97 chrt prio command [arguments]
98 .TP
99 You can also retrieve the real-time attributes of an existing task:
100 chrt -p pid
101 .TP
102 Or set them:
103 chrt -p prio pid
104 .SH PERMISSIONS
105 A user must possess
106 .BR CAP_SYS_NICE
107 to change the scheduling attributes of a process.  Any user can retrieve the
108 scheduling information.
109 .SH NOTES
110 Only
111 .BR SCHED_FIFO ,
112 .BR SCHED_OTHER
113 and
114 .BR SCHED_RR
115 are part of POSIX 1003.1b Process Scheduling. The other scheduling attributes
116 may be ignored on some systems.
117 .SH AUTHOR
118 Written by Robert M. Love.
119 .SH COPYRIGHT
120 Copyright \(co 2004 Robert M. Love
121 .br
122 This is free software; see the source for copying conditions.  There is NO
123 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
124 .SH "SEE ALSO"
125 .BR taskset (1),
126 .BR nice (1),
127 .BR renice (1)
128 .sp
129 See
130 .BR sched_setscheduler (2)
131 for a description of the Linux scheduling scheme.
132 .SH AVAILABILITY
133 The chrt command is part of the util-linux-ng package and is available from
134 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.