Show Table of Contents
11.1. Using
Chapter 11. Setting the Scheduler
There are two different ways to configure and observe process configurations: the command line utilities, and the Tuna graphical tool. This section uses the command line tools, but all actions can also be performed using Tuna.
11.1. Using chrt to Set the Scheduler
The
chrt is used to check and adjust scheduler policies and priorities. It can start new processes with the desired properties, or change the properties of a running process.
To check the attributes of a particular process, use the
--pid or -p option alone to specify the process ID (PID):
~]#chrt -p 468pid 468's current scheduling policy: SCHED_FIFO pid 468's current scheduling priority: 85 ~]#chrt -p 476pid 476's current scheduling policy: SCHED_OTHER pid 476's current scheduling priority: 0
To set the scheduling policy of a process, use the appropriate command option:
Table 11.1. Policy Options for the chrt Command
| Short option | Long option | Description |
|---|---|---|
-f | --fifo | Set schedule to SCHED_FIFO |
-o | --other | Set schedule to SCHED_OTHER |
-r | --rr | Set schedule to SCHED_RR |
To set the priority of a process, specify the value before the PID of the process that is being changed. The following command will set the process with PID 1000 to
SCHED_FIFO, with a priority of 50:
~]# chrt -f -p 50 1000
The following command will set the same process (PID 1000) to
SCHED_OTHER, with a priority of 0:
~]# chrt -o -p 0 1000
To start a new application with a given policy and priority, specify the name of the application (and the path, if necessary) along with the attributes. The following command will start /bin/my-app, with a policy of
SCHED_FIFO and a priority of 36:
~]# chrt -f 36 /bin/my-appNote
For more information, or for further reading, the following man page is related to the information given in this section:
- chrt(1)

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.