And mention in manual that the default is referring to the internal
default of this command, not the Linux system default. Manual page
example also tries to be a little more complete how to use the command.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Use dates without the day, use the full month name, put "util-linux" in
the lower left corner, and "User Commands" or "System Administration"
at the top center.
Also improve here and there the one-line program description.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Currently this program works only with the master thread. Add a '-t'
option to propagate changes to the entire group of threads.
Example:
root@offworld:~/projects/util-linux/schedutils# ls /proc/2111/task/
2111 2112 2119 2121 2138 2139 2159 2160
root@offworld:~/projects/util-linux/schedutils# ./chrt -p 2111
pid 2111's current scheduling policy: SCHED_RR
pid 2111's current scheduling priority: 3
root@offworld:~/projects/util-linux/schedutils# ./chrt -t -p 2 2111
root@offworld:~/projects/util-linux/schedutils# ./chrt -p 2112
pid 2112's current scheduling policy: SCHED_RR
pid 2112's current scheduling priority: 2
root@offworld:~/projects/util-linux/schedutils# ./chrt -p 2111
pid 2111's current scheduling policy: SCHED_RR
pid 2111's current scheduling priority: 2
[kzak@redhat.com: - rename -t/--thread to -a/--all-tasks]
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
This new option allows to set SCHED_RESET_ON_FORK flag for FIFO and RR
policies.
Example:
$ chrt --fifo --reset-on-fork 1 /bin/bash
$ schedutils/chrt --pid $$
pid 31579's current scheduling policy: SCHED_FIFO|SCHED_RESET_ON_FORK
pid 31579's current scheduling priority: 1
Signed-off-by: Karel Zak <kzak@redhat.com>
SCHED_FIFO, SCHED_OTHER, SCHED_RR are part of POSIX 1003.1b Process
Scheduling, so it is correct to assume they always exists.
SCHED_BATCH and SCHED_IDLE are Linux specific, we should not assume
they exists.
Defining SCHED_BATCH and SCHED_IDLE to random values (ie the ones found
on Linux systems) is not an option as they may *collide* with the one of
other systems. For example on GNU/kFreeBSD we have:
#define SCHED_RR 3
and on Linux we have:
#define SCHED_BATCH 3
[kzak@redhat.com: - add "Linux specific" notes to chrt.1
- add a note about BATCH and PR conflict to
this commit message]
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
Mention that only SCHED_FIFO, SCHED_OTHER and SCHED_RR are part of
POSIX 1003.1b Process Scheduling in chrt.1.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This is temporary workaround and it will be removed in 2.14 when
minimal number of people will use old systems where is not defined
SCHED_BATCH in (bits/)sched.h.
Signed-off-by: Karel Zak <kzak@redhat.com>