man-pages/man1/chrt.1.html
2021-03-31 01:06:50 +01:00

248 lines
5.8 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of CHRT</TITLE>
</HEAD><BODY>
<H1>CHRT</H1>
Section: User Commands (1)<BR>Updated: January 2016<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
chrt - manipulate the real-time attributes of a process
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>chrt</B>
[options]
<I>priority&nbsp;command&nbsp;</I>[<I>argument</I>...]
<BR>
<B>chrt</B>
[options]
<B>-p</B>
[<I>priority</I>]&nbsp;<I>pid</I>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<P>
<B>chrt</B>
sets or retrieves the real-time scheduling attributes of an existing <I>pid</I>,
or runs <I>command</I> with the given attributes.
<P>
<A NAME="lbAE">&nbsp;</A>
<H2>POLICIES</H2>
<DL COMPACT>
<DT id="1"><B>-o</B>, <B>--other</B><DD>
Set scheduling policy to
<B>SCHED_OTHER</B>.
This is the default Linux scheduling policy.
<DT id="2"><B>-f</B>, <B>--fifo</B><DD>
Set scheduling policy to <B>SCHED_FIFO</B>.
<DT id="3"><B>-r</B>, <B>--rr</B><DD>
Set scheduling policy to
<B>SCHED_RR</B>.
When no policy is defined, the
<B>SCHED_RR</B>
is used as the default.
<DT id="4"><B>-b</B>, <B>--batch</B><DD>
Set scheduling policy to
<B>SCHED_BATCH</B>
(Linux-specific, supported since 2.6.16). The priority argument has to be set to zero.
<DT id="5"><B>-i</B>, <B>--idle</B><DD>
Set scheduling policy to
<B>SCHED_IDLE</B>
(Linux-specific, supported since 2.6.23). The priority argument has to be set to zero.
<DT id="6"><B>-d</B>,&nbsp;<B>--deadline</B>
<DD>
Set scheduling policy to
<B>SCHED_DEADLINE</B>
(Linux-specific, supported since 3.14). The priority argument has to be set to zero.
See also <B>--sched-runtime</B>, <B>--sched-deadline</B> and
<B>--sched-period</B>. The relation between the options required by the kernel is
runtime &lt;= deadline &lt;= period.
<B>chrt</B>
copies <I>period</I> to <I>deadline</I> if <B>--sched-deadline</B> is not specified and
<I>deadline</I> to <I>runtime</I> if <B>--sched-runtime</B> is not specified.
It means that at least <B>--sched-period</B> has to be specified. See
<B><A HREF="/cgi-bin/man/man2html?7+sched">sched</A></B>(7)
for more details.
<P>
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>SCHEDULING OPTIONS</H2>
<DL COMPACT>
<DT id="7"><B>-T</B>, <B>--sched-runtime</B> <I>nanoseconds</I><DD>
Specifies runtime parameter for SCHED_DEADLINE policy (Linux-specific).
<DT id="8"><B>-P</B>, <B>--sched-period</B> <I>nanoseconds</I><DD>
Specifies period parameter for SCHED_DEADLINE policy (Linux-specific).
<DT id="9"><B>-D</B>, <B>--sched-deadline</B> <I>nanoseconds</I><DD>
Specifies deadline parameter for SCHED_DEADLINE policy (Linux-specific).
<DT id="10"><B>-R</B>, <B>--reset-on-fork</B><DD>
Add
<B>SCHED_RESET_ON_FORK</B>
flag to the
<B>SCHED_FIFO</B>
or
<B>SCHED_RR</B>
scheduling policy (Linux-specific, supported since 2.6.31).
<P>
</DL>
<A NAME="lbAG">&nbsp;</A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT id="11"><B>-a</B>,&nbsp;<B>--all-tasks</B>
<DD>
Set or retrieve the scheduling attributes of all the tasks (threads) for a
given PID.
<DT id="12"><B>-m</B>,&nbsp;<B>--max</B>
<DD>
Show minimum and maximum valid priorities, then exit.
<DT id="13"><B>-p</B>,&nbsp;<B>--pid</B>
<DD>
Operate on an existing PID and do not launch a new task.
<DT id="14"><B>-v</B>,&nbsp;<B>--verbose</B>
<DD>
Show status information.
<DT id="15"><B>-V</B>,&nbsp;<B>--version</B>
<DD>
Display version information and exit.
<DT id="16"><B>-h</B>,&nbsp;<B>--help</B>
<DD>
Display help text and exit.
</DL>
<A NAME="lbAH">&nbsp;</A>
<H2>USAGE</H2>
<DL COMPACT>
<DT id="17">The default behavior is to run a new command:<DD>
<B>chrt</B>
<I>priority</I>
<I>command&nbsp;</I>[<I>arguments</I>]
<DT id="18">You can also retrieve the real-time attributes of an existing task:<DD>
<B>chrt -p</B>
<I>pid</I>
<DT id="19">Or set them:<DD>
<B>chrt -r -p</B>
<I>priority pid</I>
</DL>
<A NAME="lbAI">&nbsp;</A>
<H2>PERMISSIONS</H2>
A user must possess
<B>CAP_SYS_NICE</B>
to change the scheduling attributes of a process. Any user can retrieve the
scheduling information.
<P>
<A NAME="lbAJ">&nbsp;</A>
<H2>NOTES</H2>
Only
<B>SCHED_FIFO</B>,
<B>SCHED_OTHER</B>
and
<B>SCHED_RR</B>
are part of POSIX 1003.1b Process Scheduling. The other scheduling attributes
may be ignored on some systems.
<P>
Linux' default scheduling policy is
<B>SCHED_OTHER</B>.
<A NAME="lbAK">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?1+nice">nice</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?1+renice">renice</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?1+taskset">taskset</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?7+sched">sched</A></B>(7)
<P>
See
<B><A HREF="/cgi-bin/man/man2html?2+sched_setscheduler">sched_setscheduler</A></B>(2)
for a description of the Linux scheduling scheme.
<A NAME="lbAL">&nbsp;</A>
<H2>AUTHORS</H2>
Robert Love
<BR>
Karel Zak
<A NAME="lbAM">&nbsp;</A>
<H2>AVAILABILITY</H2>
The chrt command is part of the util-linux package and is available from
<A HREF="https://www.kernel.org/pub/linux/utils/util-linux/.">https://www.kernel.org/pub/linux/utils/util-linux/.</A>
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="20"><A HREF="#lbAB">NAME</A><DD>
<DT id="21"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="22"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="23"><A HREF="#lbAE">POLICIES</A><DD>
<DT id="24"><A HREF="#lbAF">SCHEDULING OPTIONS</A><DD>
<DT id="25"><A HREF="#lbAG">OPTIONS</A><DD>
<DT id="26"><A HREF="#lbAH">USAGE</A><DD>
<DT id="27"><A HREF="#lbAI">PERMISSIONS</A><DD>
<DT id="28"><A HREF="#lbAJ">NOTES</A><DD>
<DT id="29"><A HREF="#lbAK">SEE ALSO</A><DD>
<DT id="30"><A HREF="#lbAL">AUTHORS</A><DD>
<DT id="31"><A HREF="#lbAM">AVAILABILITY</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:09 GMT, March 31, 2021
</BODY>
</HTML>