summaryrefslogtreecommitdiffstats
path: root/schedutils/chrt.1
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--schedutils/chrt.1192
-rw-r--r--schedutils/chrt.1.adoc153
2 files changed, 345 insertions, 0 deletions
diff --git a/schedutils/chrt.1 b/schedutils/chrt.1
new file mode 100644
index 0000000..e9bb863
--- /dev/null
+++ b/schedutils/chrt.1
@@ -0,0 +1,192 @@
+'\" t
+.\" Title: chrt
+.\" Author: [see the "AUTHOR(S)" section]
+.\" Generator: Asciidoctor 2.0.15
+.\" Date: 2022-05-11
+.\" Manual: User Commands
+.\" Source: util-linux 2.38.1
+.\" Language: English
+.\"
+.TH "CHRT" "1" "2022-05-11" "util\-linux 2.38.1" "User Commands"
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.ss \n[.ss] 0
+.nh
+.ad l
+.de URL
+\fI\\$2\fP <\\$1>\\$3
+..
+.als MTO URL
+.if \n[.g] \{\
+. mso www.tmac
+. am URL
+. ad l
+. .
+. am MTO
+. ad l
+. .
+. LINKSTYLE blue R < >
+.\}
+.SH "NAME"
+chrt \- manipulate the real\-time attributes of a process
+.SH "SYNOPSIS"
+.sp
+\fBchrt\fP [options] \fIpriority command argument\fP ...
+.sp
+\fBchrt\fP [options] \fB\-p\fP [\fIpriority\fP] \fIPID\fP
+.SH "DESCRIPTION"
+.sp
+\fBchrt\fP sets or retrieves the real\-time scheduling attributes of an existing \fIPID\fP, or runs \fIcommand\fP with the given attributes.
+.SH "POLICIES"
+.sp
+\fB\-o\fP, \fB\-\-other\fP
+.RS 4
+Set scheduling policy to \fBSCHED_OTHER\fP (time\-sharing scheduling). This is the default Linux scheduling policy.
+.RE
+.sp
+\fB\-f\fP, \fB\-\-fifo\fP
+.RS 4
+Set scheduling policy to \fBSCHED_FIFO\fP (first in\-first out).
+.RE
+.sp
+\fB\-r\fP, \fB\-\-rr\fP
+.RS 4
+Set scheduling policy to \fBSCHED_RR\fP (round\-robin scheduling). When no policy is defined, the \fBSCHED_RR\fP is used as the default.
+.RE
+.sp
+\fB\-b\fP, \fB\-\-batch\fP
+.RS 4
+Set scheduling policy to \fBSCHED_BATCH\fP (scheduling batch processes). Linux\-specific, supported since 2.6.16. The priority argument has to be set to zero.
+.RE
+.sp
+\fB\-i\fP, \fB\-\-idle\fP
+.RS 4
+Set scheduling policy to \fBSCHED_IDLE\fP (scheduling very low priority jobs). Linux\-specific, supported since 2.6.23. The priority argument has to be set to zero.
+.RE
+.sp
+\fB\-d\fP, \fB\-\-deadline\fP
+.RS 4
+Set scheduling policy to \fBSCHED_DEADLINE\fP (sporadic task model deadline scheduling). Linux\-specific, supported since 3.14. The priority argument has to be set to zero. See also \fB\-\-sched\-runtime\fP, \fB\-\-sched\-deadline\fP and \fB\-\-sched\-period\fP. The relation between the options required by the kernel is runtime \(lA deadline \(lA period. \fBchrt\fP copies \fIperiod\fP to \fIdeadline\fP if \fB\-\-sched\-deadline\fP is not specified and \fIdeadline\fP to \fIruntime\fP if \fB\-\-sched\-runtime\fP is not specified. It means that at least \fB\-\-sched\-period\fP has to be specified. See \fBsched\fP(7) for more details.
+.RE
+.SH "SCHEDULING OPTIONS"
+.sp
+\fB\-T\fP, \fB\-\-sched\-runtime\fP \fInanoseconds\fP
+.RS 4
+Specifies runtime parameter for \fBSCHED_DEADLINE\fP policy (Linux\-specific).
+.RE
+.sp
+\fB\-P\fP, \fB\-\-sched\-period\fP \fInanoseconds\fP
+.RS 4
+Specifies period parameter for \fBSCHED_DEADLINE\fP policy (Linux\-specific).
+.RE
+.sp
+\fB\-D\fP, \fB\-\-sched\-deadline\fP \fInanoseconds\fP
+.RS 4
+Specifies deadline parameter for \fBSCHED_DEADLINE\fP policy (Linux\-specific).
+.RE
+.sp
+\fB\-R\fP, \fB\-\-reset\-on\-fork\fP
+.RS 4
+Use \fBSCHED_RESET_ON_FORK\fP or \fBSCHED_FLAG_RESET_ON_FORK\fP flag. Linux\-specific, supported since 2.6.31.
+.RE
+.sp
+Each thread has a \fIreset\-on\-fork\fP scheduling flag. When this flag is set, children created by \fBfork\fP(2) do not inherit privileged scheduling policies. After the \fIreset\-on\-fork\fP flag has been enabled, it can be reset only if the thread has the \fBCAP_SYS_NICE\fP capability. This flag is disabled in child processes created by \fBfork\fP(2).
+.sp
+More precisely, if the \fIreset\-on\-fork\fP flag is set, the following rules apply for subsequently created children:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+. sp -1
+. IP \(bu 2.3
+.\}
+If the calling thread has a scheduling policy of \fBSCHED_FIFO\fP or \fBSCHED_RR\fP, the policy is reset to \fBSCHED_OTHER\fP in child processes.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+. sp -1
+. IP \(bu 2.3
+.\}
+If the calling process has a negative nice value, the nice value is reset to zero in child processes.
+.RE
+.SH "OPTIONS"
+.sp
+\fB\-a\fP, \fB\-\-all\-tasks\fP
+.RS 4
+Set or retrieve the scheduling attributes of all the tasks (threads) for a given PID.
+.RE
+.sp
+\fB\-m\fP, \fB\-\-max\fP
+.RS 4
+Show minimum and maximum valid priorities, then exit.
+.RE
+.sp
+\fB\-p\fP, \fB\-\-pid\fP
+.RS 4
+Operate on an existing PID and do not launch a new task.
+.RE
+.sp
+\fB\-v\fP, \fB\-\-verbose\fP
+.RS 4
+Show status information.
+.RE
+.sp
+\fB\-h\fP, \fB\-\-help\fP
+.RS 4
+Display help text and exit.
+.RE
+.sp
+\fB\-V\fP, \fB\-\-version\fP
+.RS 4
+Print version and exit.
+.RE
+.SH "USAGE"
+.sp
+The default behavior is to run a new command:
+.RS 4
+\fBchrt\fP \fIpriority\fP \fIcommand\fP [\fIarguments\fP]
+.RE
+.sp
+You can also retrieve the real\-time attributes of an existing task:
+.RS 4
+\fBchrt \-p\fP \fIPID\fP
+.RE
+.sp
+Or set them:
+.RS 4
+\fBchrt \-r \-p\fP \fIpriority PID\fP
+.RE
+.SH "PERMISSIONS"
+.sp
+A user must possess \fBCAP_SYS_NICE\fP to change the scheduling attributes of a process. Any user can retrieve the scheduling information.
+.SH "NOTES"
+.sp
+Only \fBSCHED_FIFO\fP, \fBSCHED_OTHER\fP and \fBSCHED_RR\fP are part of POSIX 1003.1b Process Scheduling. The other scheduling attributes may be ignored on some systems.
+.sp
+Linux\(aq default scheduling policy is \fBSCHED_OTHER\fP.
+.SH "AUTHORS"
+.sp
+.MTO "rml\(attech9.net" "Robert Love" ","
+.MTO "kzak\(atredhat.com" "Karel Zak" ""
+.SH "SEE ALSO"
+.sp
+\fBnice\fP(1),
+\fBrenice\fP(1),
+\fBtaskset\fP(1),
+\fBsched\fP(7)
+.sp
+See \fBsched_setscheduler\fP(2) for a description of the Linux scheduling scheme.
+.SH "REPORTING BUGS"
+.sp
+For bug reports, use the issue tracker at \c
+.URL "https://github.com/util\-linux/util\-linux/issues" "" "."
+.SH "AVAILABILITY"
+.sp
+The \fBchrt\fP command is part of the util\-linux package which can be downloaded from \c
+.URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux Kernel Archive" "." \ No newline at end of file
diff --git a/schedutils/chrt.1.adoc b/schedutils/chrt.1.adoc
new file mode 100644
index 0000000..6ccba7d
--- /dev/null
+++ b/schedutils/chrt.1.adoc
@@ -0,0 +1,153 @@
+//po4a: entry man manual
+////
+chrt(1) manpage
+
+Copyright (C) 2004 Robert Love
+Copyright (C) 2015 Karel Zak <kzak@redhat.com>
+
+This is free documentation; you can redistribute it and/or
+modify it under the terms of the GNU General Public License,
+version 2, as published by the Free Software Foundation.
+
+The GNU General Public License's references to "object code"
+and "executables" are to be interpreted as the output of any
+document formatting or typesetting system, including
+intermediate and printed output.
+
+This manual is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+////
+= chrt(1)
+:doctype: manpage
+:man manual: User Commands
+:man source: util-linux {release-version}
+:page-layout: base
+:command: chrt
+:colon: :
+
+== NAME
+
+chrt - manipulate the real-time attributes of a process
+
+== SYNOPSIS
+
+*chrt* [options] _priority command argument_ ...
+
+*chrt* [options] *-p* [_priority_] _PID_
+
+== DESCRIPTION
+
+*chrt* sets or retrieves the real-time scheduling attributes of an existing _PID_, or runs _command_ with the given attributes.
+
+== POLICIES
+
+*-o*, *--other*::
+Set scheduling policy to *SCHED_OTHER* (time-sharing scheduling). This is the default Linux scheduling policy.
+
+*-f*, *--fifo*::
+Set scheduling policy to *SCHED_FIFO* (first in-first out).
+
+*-r*, *--rr*::
+Set scheduling policy to *SCHED_RR* (round-robin scheduling). When no policy is defined, the *SCHED_RR* is used as the default.
+
+*-b*, *--batch*::
+Set scheduling policy to *SCHED_BATCH* (scheduling batch processes). Linux-specific, supported since 2.6.16. The priority argument has to be set to zero.
+
+*-i*, *--idle*::
+Set scheduling policy to *SCHED_IDLE* (scheduling very low priority jobs). Linux-specific, supported since 2.6.23. The priority argument has to be set to zero.
+
+*-d*, *--deadline*::
+Set scheduling policy to *SCHED_DEADLINE* (sporadic task model deadline scheduling). Linux-specific, supported since 3.14. The priority argument has to be set to zero. See also *--sched-runtime*, *--sched-deadline* and *--sched-period*. The relation between the options required by the kernel is runtime <= deadline <= period. *chrt* copies _period_ to _deadline_ if *--sched-deadline* is not specified and _deadline_ to _runtime_ if *--sched-runtime* is not specified. It means that at least *--sched-period* has to be specified. See *sched*(7) for more details.
+
+== SCHEDULING OPTIONS
+
+*-T*, *--sched-runtime* _nanoseconds_::
+Specifies runtime parameter for *SCHED_DEADLINE* policy (Linux-specific).
+
+*-P*, *--sched-period* _nanoseconds_::
+Specifies period parameter for *SCHED_DEADLINE* policy (Linux-specific).
+
+*-D*, *--sched-deadline* _nanoseconds_::
+Specifies deadline parameter for *SCHED_DEADLINE* policy (Linux-specific).
+
+*-R*, *--reset-on-fork*::
+Use *SCHED_RESET_ON_FORK* or *SCHED_FLAG_RESET_ON_FORK* flag. Linux-specific, supported since 2.6.31.
+
+Each thread has a _reset-on-fork_ scheduling flag. When this flag is set, children created by *fork*(2) do not inherit privileged scheduling policies. After the _reset-on-fork_ flag has been enabled, it can be reset only if the thread has the *CAP_SYS_NICE* capability. This flag is disabled in child processes created by *fork*(2).
+
+More precisely, if the _reset-on-fork_ flag is set, the following rules apply for subsequently created children:
+
+* If the calling thread has a scheduling policy of *SCHED_FIFO* or *SCHED_RR*, the policy is reset to *SCHED_OTHER* in child processes.
+
+* If the calling process has a negative nice value, the nice value is reset to zero in child processes.
+
+== OPTIONS
+
+*-a*, *--all-tasks*::
+Set or retrieve the scheduling attributes of all the tasks (threads) for a given PID.
+
+*-m*, *--max*::
+Show minimum and maximum valid priorities, then exit.
+
+*-p*, *--pid*::
+Operate on an existing PID and do not launch a new task.
+
+*-v*, *--verbose*::
+Show status information.
+
+include::man-common/help-version.adoc[]
+
+== USAGE
+
+//TRANSLATORS: Keep {colon} untranslated
+The default behavior is to run a new command{colon}::
+
+*chrt* _priority_ _command_ [_arguments_]
+
+//TRANSLATORS: Keep {colon} untranslated
+You can also retrieve the real-time attributes of an existing task{colon}::
+
+*chrt -p* _PID_
+
+//TRANSLATORS: Keep {colon} untranslated
+Or set them{colon}::
+
+*chrt -r -p* _priority PID_
+
+== PERMISSIONS
+
+A user must possess *CAP_SYS_NICE* to change the scheduling attributes of a process. Any user can retrieve the scheduling information.
+
+== NOTES
+
+Only *SCHED_FIFO*, *SCHED_OTHER* and *SCHED_RR* are part of POSIX 1003.1b Process Scheduling. The other scheduling attributes may be ignored on some systems.
+
+Linux' default scheduling policy is *SCHED_OTHER*.
+
+== AUTHORS
+
+mailto:rml@tech9.net[Robert Love],
+mailto:kzak@redhat.com[Karel Zak]
+
+== SEE ALSO
+
+*nice*(1),
+*renice*(1),
+*taskset*(1),
+*sched*(7)
+
+See *sched_setscheduler*(2) for a description of the Linux scheduling scheme.
+
+include::man-common/bugreports.adoc[]
+
+include::man-common/footer.adoc[]
+
+ifdef::translation[]
+include::man-common/translation.adoc[]
+endif::[]