CHRT(1)
๐ chrt โ bestie edition ๐
okay so you found the chrt page in the User Commands section of the manual (it's chrt(1), she's an icon, she's from util-linux, we love her) and now you need someone to explain it without making your brain leak. that's me. hi. sit down, grab a strawberry ๐, let's go.
โจ NAME โจ
chrt โ manipulate the real-time attributes of a process
like. she controls the scheduling vibes of your processes. that's the whole job. main character energy fr. ๐
๐ SYNOPSIS ๐
chrt [options] [priority] command [argument...]
chrt --pid [options] [priority] PID
two modes bestie: either you're launching a whole new command with the attributes, or you're reaching into an already-running process by its PID. pick your fighter. ๐
๐ฆ DESCRIPTION ๐ฆ
chrt sets or retrieves the real-time scheduling attributes of an existing PID, or runs command with the given attributes.
that's it. that's the tea. you either look at the scheduling setup, or you change it, or you spawn something new already dressed in it. iconic behavior honestly. โจ
๐ POLICY OPTIONS ๐
these are the actual personality traits you're assigning. choose wisely.
-o,--otherโ sets the scheduling policy toSCHED_OTHER(time-sharing scheduling). this is the default Linux scheduling policy, the plain little vanilla one. since util-linux v2.42 the priority argument is optional here; if you do specify it, it must be set to zero. no exceptions bestie.-f,--fifoโ sets the scheduling policy toSCHED_FIFO(first in-first out).-r,--rrโ sets the scheduling policy toSCHED_RR(round-robin scheduling). when no policy is defined,SCHED_RRis used as the default.-b,--batchโ sets the scheduling policy toSCHED_BATCH(scheduling batch processes). Linux-specific, supported since 2.6.16. since util-linux v2.42 the priority argument is optional; if specified, it must be set to zero.-i,--idleโ sets the scheduling policy toSCHED_IDLE(scheduling very low priority jobs). Linux-specific, supported since 2.6.23. since util-linux v2.42 the priority argument is optional; if specified, it must be set to zero.-d,--deadlineโ sets the scheduling policy toSCHED_DEADLINE(sporadic task model deadline scheduling). Linux-specific, supported since 3.14. since util-linux v2.42 the priority argument is optional; if specified, it must be set to zero. see also--sched-runtime,--sched-deadlineand--sched-period. the relation between the options required by the kernel is runtime โ deadline โ period.chrtcopies period to deadline if--sched-deadlineis not specified, and deadline to runtime if--sched-runtimeis not specified. which means at least--sched-periodhas to be specified. seesched(7)for more details.-e,--extโ sets the scheduling policy toSCHED_EXT(BPF program-defined scheduling). Linux-specific, supported since 6.12. since util-linux v2.42 the priority argument is optional; if specified, it must be set to zero. note that for the policy to be recognized, the following kernel configuration options need to be enabled:CONFIG_BPF,CONFIG_SCHED_CLASS_EXT,CONFIG_BPF_SYSCALL,CONFIG_BPF_JIT,CONFIG_DEBUG_INFO_BTF,CONFIG_BPF_JIT_ALWAYS_ONandCONFIG_BPF_JIT_DEFAULT_ON. that's a lot of configs. good luck bestie ๐ซถ
๐ง SCHEDULING OPTIONS ๐ง
-T,--sched-runtimenanoseconds โ specifies the runtime parameter forSCHED_DEADLINE, and the custom slice length forSCHED_OTHERandSCHED_BATCHpolicies (Linux-specific). note that custom slice length via the runtime parameter is supported since Linux 6.12.-P,--sched-periodnanoseconds โ specifies the period parameter forSCHED_DEADLINEpolicy (Linux-specific). note that the kernel's lower limit is 100 microseconds.-D,--sched-deadlinenanoseconds โ specifies the deadline parameter forSCHED_DEADLINEpolicy (Linux-specific).-R,--reset-on-forkโ useSCHED_RESET_ON_FORKorSCHED_FLAG_RESET_ON_FORKflag. 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_FIFOorSCHED_RR, the policy is reset toSCHED_OTHERin 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 givenPID. all of them. every single one.-m,--maxโ show minimum and maximum valid priorities, then exit.-p,--pidโ operate on an existingPIDand do not launch a new task.-v,--verboseโ show status information.-h,--helpโ display help text and exit.-V,--versionโ display version and exit.
๐ EXAMPLES ๐
the default behavior is to run a new command:
chrt priority command [arguments]
you can also retrieve the real-time attributes of an existing task:
chrt --pid PID
or set them:
chrt --pid policy-option priority PID
for example, to set the scheduling policy to SCHED_RR (round-robin) and the priority to 30 for process 1234:
chrt --pid -r 30 1234
reset priorities to default for a process:
chrt --pid -o 0 PID
set a custom slice of 1 ms for a SCHED_OTHER task (priority is optional for policies other than SCHED_FIFO and SCHED_RR):
chrt --pid -o -T 1000000 PID
see sched(7) for a detailed discussion of the different scheduler classes and how they interact.
๐ PERMISSIONS ๐
a user must possess CAP_SYS_NICE to change the scheduling attributes of a process. any user can retrieve the scheduling information.
so reading = free, writing = bring your capabilities. no cap. ๐ค
๐ 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. lowkey rude of them but okay.
Linux' default scheduling policy is SCHED_OTHER.
๐ AUTHORS ๐
Robert Love <rml@tech9.net>, Karel Zak <kzak@redhat.com>
legends, honestly. we stan. ๐ซถ
๐ธ SEE ALSO ๐ธ
nice(1), renice(1), taskset(1), sched(7)
see sched_setscheduler(2) for a description of the Linux scheduling scheme.
๐ REPORTING BUGS ๐
for bug reports, use the issue tracker <https://github.com/util-linux/util-linux/issues>.
โญ AVAILABILITY โญ
the chrt command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.
and that's the whole page bestie, you're officially a scheduling girlie now โจ this was util-linux 2.42.4, dated 2026-09-21, and yes she ate ๐ ๐ฆ๐
๐ฆ where this page comes from
- arch rolling: util-linux 2.42.4-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ISC AND LGPL-2.1-or-later AND LicenseRef-PublicDomain
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms