Commit Graph

38 Commits

Author SHA1 Message Date
Karel Zak 865f5f469c chrt: don't restrict --reset-on-fork, add more info to man page
The flag works (= kernel accepts it) for all scheduling policies
and sched_getattr() returns the flag for all policies.

There is no reason for userspace to be more smart than kernel or hide
the flag when it prints sched_getattr()/sched_getscheduler() results.

 # chrt -v --reset-on-fork --batch 0 /bin/true
 pid 1315019's new scheduling policy: SCHED_BATCH|SCHED_RESET_ON_FORK

 # chrt -v --reset-on-fork --fifo 1 /bin/true
 pid 1315055's new scheduling policy: SCHED_FIFO|SCHED_RESET_ON_FORK

 # chrt -v --reset-on-fork --deadline --sched-period 10000 0 /bin/true
 pid 1315182's new scheduling policy: SCHED_DEADLINE|SCHED_RESET_ON_FORK

 # chrt -v --reset-on-fork --idle 0 /bin/true
 pid 1315247's new scheduling policy: SCHED_IDLE|SCHED_RESET_ON_FORK

 # chrt -v --reset-on-fork --rr 1 /bin/true
 pid 1315275's new scheduling policy: SCHED_RR|SCHED_RESET_ON_FORK

 # chrt -v --reset-on-fork --other 0 /bin/true
 pid 1315311's new scheduling policy: SCHED_OTHER|SCHED_RESET_ON_FORK

Signed-off-by: Karel Zak <kzak@redhat.com>
2020-10-01 11:51:12 +02:00
Karel Zak fb4f1da4e0 chrt: (man) add human-readable names for policies
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-10-01 11:04:29 +02:00
Bjarni Ingi Gislason 75ba1d8c28 doc: schedutils/*: Fix some warnings from "mandoc -T lint"
mandoc: ./schedutils/chrt.1:37:2: WARNING: skipping paragraph macro: PP after SH

mandoc: ./schedutils/ionice.1:120:2: WARNING: skipping paragraph macro: PP empty

mandoc: ./schedutils/taskset.1:36:2: WARNING: skipping paragraph macro: PP after SH

####

  There is no change in the ouput from "nroff" and "groff".

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
2020-06-15 11:28:01 +02:00
Michael Kerrisk (man-pages) ade04bb89c Manual pages: order AUTHORS / COPYRIGHT / SEE ALSO / AVAILABILITY consistently
There is value in ensuring that manual page sections use consistently
named sections, as far as possible, and also that sections have a
consistent order within manual pages. This is one of a series of patches
to place manual page sections in a consistent order.

In this patch, we ensure that the AUTHORS, COPYRIGHT, SEE ALSO, and
AVAILABILITY sections are always placed at the end of the page.

Testing that no gross editing mistake (causing accidental loss or addition
of text) was performed as follows:

    $ cat $(grep '\.SH' -l $(find . -name '*.[1-9]') |sort) | sort > a
    [Apply patch]
    $ cat $(grep '\.SH' -l $(find . -name '*.[1-9]') |sort) | sort > b
    $ diff a b
    $ echo $?
    0

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-22 10:25:49 +02:00
Michael Kerrisk (man-pages) 5a82980632 docs: (man) remove double quotes (") in .SH lines
Using double quotes in .SH lines containing multiple words is unneeded,
and in any case is not consistently done in the util-linux manual pages,
where double quotes are used in only around half of the cases.
(This usage was long ago elminated in the man-pages project, with
no ill effects reported to date.)

Remove these quotes, so that .SH lines are more uniform, in preparation
for some (more easily) scripted doiscovery of consistency problems in
(and possibly global fixes to) the manual pages.

Other than stripping the double quotes, this patch makes no changes to
the content of the manual pages.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-19 12:15:34 +02:00
Bjarni Ingi Gislason 1c4c602427 man pages: Change a HYPHEN-MINUS (-) to a minus (\-) for options and numbers
Change a HYPHEN-MINUS (code 0x55, 2D) to a minus (\-), if in front of

1) a name of an option

2) a negative number to be printed.

  See man-pages(7) [Debian package "manpages"].

  The output from "nroff" is unchanged.

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
2019-12-17 12:32:43 +01:00
Bjarni Ingi Gislason 0bb7e904d7 man: Use the correct macro for a font change of one argument
Use the correct macro (I, B) for the font change of one argument, not
those that are used for alternating two fonts, like "BR", "IR", "RB",
or "RI".

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
2018-05-23 10:43:27 +02:00
Sébastien Helleu d673b74e9d docs: replace FTP by HTTPS in kernel.org URLs
The links to ftp://ftp.kernel.org/ are replaced by
https://www.kernel.org/.

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-12-19 11:22:26 +01:00
Michael Kerrisk (man-pages) f053ff1e3a Place SEE ALSO entries in order
This patch does only the following:

* Order SEE ALSO entries first by section name, then alphabetically
  within section
* Adds one or two missing commas in SEE ALSO lists
* Removes one or two periods that were (inconsistently) used
  at the end of SEE ALSO lists.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-29 10:44:19 +01:00
Benno Schulenberg 8722fc38b1 chrt: remove duplicate words and tweak some phrasings in the man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-17 12:18:52 +01:00
Karel Zak 5b033bfd85 chrt: make man page more structured
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-20 14:30:52 +01:00
Karel Zak 1a7e63950b chrt: add support for SCHED_DEADLINE
This patch introduces

	-d, --deadline
	-T, --sched-runtime
	-D, --sched-deadline
	-P, --sched-period

command line options. The functionality is available only for Linux with
sched_setattr() [kernel >=3.14]

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-20 14:04:32 +01:00
Karel Zak 505edf1c5f chrt: add note about zero priority for IDLE and BATCH
Reported-by: dE <de.techno@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-01-26 12:53:21 +01:00
Benno Schulenberg 3a60b1c26b docs: remove obsolete and unneeded comments from man-page files
Transform some of them into copyright lines.
Also fix three header lines and snip some trailing whitespace.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2015-01-12 11:03:26 +01:00
Benno Schulenberg 42f15e9848 docs: bring the chrt and taskset man pages closer to standard formatting
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-08-20 10:47:10 +02:00
Benno Schulenberg 5aab9a1aee docs: make the man-page licenses of chrt and taskset match their intent
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-08-20 10:47:08 +02:00
Benno Schulenberg b4362b6f84 docs: standardize the phrases for --help and --version in all man pages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-10-15 10:28:30 +02:00
Sami Kerola fdf8fb1cc0 chrt: make command syntax easier to understand in usage()
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>
2013-04-05 13:56:17 +02:00
Sami Kerola 7cebf0bb4f docs: corrections to FSF license files, and postal address
The COPYING and Documentation/licenses/COPYING* files are being
replaced by files from GNU web site.

http://www.gnu.org/licenses/gpl-2.0.txt
http://www.gnu.org/licenses/lgpl-2.1.txt

Postal addresses to FSF in other files are updated to match with the
address in license files.

Reference: http://lists.gnu.org/archive/html/freefont-announce/2005-04/msg00001.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-02-24 14:13:35 +01:00
Benno Schulenberg 232dc924c4 docs: uniformize the header and footer lines in man pages
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>
2011-08-22 10:39:21 +02:00
Benno Schulenberg 397a511458 chrt: adjust style of man page, alphabetize option -p
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2011-08-08 11:58:48 +02:00
Davidlohr Bueso f82ce2aab1 chrt.1: fix grammar
Corrent the English grammar for the new -a option.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2011-05-10 14:21:33 +02:00
Karel Zak 503cbbe1d4 chrt: allow to use --all-tasks when retrieve info
master thread:
 $ chrt --pid $(pidof firefox)

all threads:
 $ chrt --all-tasks --pid $(pidof firefox)

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-05-05 14:23:38 +02:00
Davidlohr Bueso 78904e7647 chrt: make threads aware
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>
2011-05-05 14:02:34 +02:00
Davidlohr Bueso cdc1ae5fb2 schedutils: fix typos
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2011-01-17 15:26:35 +01:00
Karel Zak 601d12fb10 rename util-linux-ng back to util-linux
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-30 11:41:59 +01:00
Benno Schulenberg 5f71997106 chrt: add --verbose to man page, correct -V for --version, alphabetize
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2010-06-15 12:34:09 +02:00
Karel Zak cdfb1e8822 chrt: add --reset-on-fork
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>
2010-02-02 21:28:45 +01:00
Aurelien Jarno b64279dab8 chrt: don't assume SCHED_BATCH and SCHED_IDLE exist
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>
2009-05-07 11:28:08 +02:00
Aurelien Jarno 40bc2ab516 chrt: add a comment about non POSIX 1003.1b attributes in chrt.1
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>
2009-04-23 13:14:33 +02:00
Martin Steigerwald c779d6e94f chrt: support CFS SCHED_IDLE priority and document it
Signed-off-by: Martin Steigerwald <ms@teamix.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-09-23 23:28:00 +02:00
LaMont Jones 5ebbcdf9c8 man-pages: cleanup of chrt.1 and taskset.1
Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-08-15 12:03:51 +02:00
Matthias Koenig 697d58e867 schedutils: fix chrt docs and pid=0 usage
Fix some documentation bugs for chrt.
Make it work with PID 0, which means current process.

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
2007-07-16 15:12:36 +02:00
Karel Zak 86d62711a9 man pages: add "AVAILABILITY" section
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-03 01:17:04 +02:00
Karel Zak 09dd84cac7 schedutils: define SCHED_BATCH when compile with old glibc
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>
2007-04-11 23:18:08 +02:00
Karel Zak df3773fba0 schedutils: add support for SCHED_BATCH
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-16 15:24:13 +01:00
Karel Zak 5ee003094e schedutils: remove extra hyptens from man pages
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-16 14:30:24 +01:00
Karel Zak 48d7b13a1e Imported from util-linux-2.13-pre1 tarball. 2006-12-07 00:26:54 +01:00