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 to SCHED_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 to SCHED_FIFO (first in-first out).
  • -r, --rr โ€” sets the scheduling policy to SCHED_RR (round-robin scheduling). when no policy is defined, SCHED_RR is used as the default.
  • -b, --batch โ€” sets the scheduling policy to SCHED_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 to SCHED_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 to SCHED_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-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. which means at least --sched-period has to be specified. see sched(7) for more details.
  • -e, --ext โ€” sets the scheduling policy to SCHED_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_ON and CONFIG_BPF_JIT_DEFAULT_ON. that's a lot of configs. good luck bestie ๐Ÿซถ

๐Ÿงš SCHEDULING OPTIONS ๐Ÿงš

  • -T, --sched-runtime nanoseconds โ€” specifies the runtime parameter for SCHED_DEADLINE, and the custom slice length for SCHED_OTHER and SCHED_BATCH policies (Linux-specific). note that custom slice length via the runtime parameter is supported since Linux 6.12.
  • -P, --sched-period nanoseconds โ€” specifies the period parameter for SCHED_DEADLINE policy (Linux-specific). note that the kernel's lower limit is 100 microseconds.
  • -D, --sched-deadline nanoseconds โ€” specifies the 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. all of them. every single one.
  • -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.
  • -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