# chrt

## NAME



           chrt - manipulate the real-time attributes of a process
    


## SYNOPSIS



           **chrt**[options] _priority command_ [_argument_...]
    
           **chrt**[options] **--pid**[_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.
               Since util-linux v2.42, the priority argument is optional; if
               specified, it must be set to zero.
    
           **-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. Since
               util-linux v2.42, the priority argument is optional; if
               specified, it must be set to zero.
    
           **-i** , **--idle**
               Set 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**
               Set 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. It means that at least **--sched-period** has to be
               specified. See sched(7) for more details.
    
           **-e** , **--ext**
               Set 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.
    


## SCHEDULING OPTIONS



           **-T** , **--sched-runtime** _nanoseconds_
               Specifies runtime parameter for **SCHED_DEADLINE** and 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 period parameter for **SCHED_DEADLINE** policy
               (Linux-specific). Note that the kernel’s lower limit is 100
               milliseconds.
    
           **-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.
    
           **-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 -r --pid** _priority PID_
    
           This, for example, sets real-time scheduling to priority _30_ for
           the process _PID_ with the **SCHED_RR**(round-robin) class:
    
              **chrt -r --pid 30** _PID_
    
           Reset priorities to default for a process:
    
              **chrt -o --pid 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 -o -T 1000000 --pid** _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.
    


## 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**.
    


## 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/>. This page is
           part of the _util-linux_ (a random collection of Linux utilities)
           project. Information about the project can be found at 
           ⟨https://www.kernel.org/pub/linux/utils/util-linux/⟩. If you have a
           bug report for this manual page, send it to
           util-linux@vger.kernel.org. This page was obtained from the
           project's upstream Git repository
           ⟨git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git⟩ on
           2025-08-11. (At that time, the date of the most recent commit that
           was found in the repository was 2025-08-05.) If you discover any
           rendering problems in this HTML version of the page, or you
           believe there is a better or more up-to-date source for the page,
           or you have corrections or improvements to the information in this
           COLOPHON (which is _not_ part of the original manual page), send a
           mail to man-pages@man7.org
    
    util-linux 2.42-start-521-ec46  2025-08-09                        _CHRT_(1)
    


* * *