When --pid is among the options, it is clearest when it is given as the first option, because then it doesn't sit between the policy option and the somewhat related priority value. It creates some kind of symmetry: the --pid option first, then other things, and the actual PID last. CC: Madadi Vineeth Reddy <vineethr@xxxxxxxxxxxxx> Signed-off-by: Benno Schulenberg <bensberg@xxxxxxxxxx> --- schedutils/chrt.1.adoc | 12 ++++++------ schedutils/chrt.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/schedutils/chrt.1.adoc b/schedutils/chrt.1.adoc index 7ed676a9a..7805ec6d2 100644 --- a/schedutils/chrt.1.adoc +++ b/schedutils/chrt.1.adoc @@ -40,13 +40,13 @@ chrt - manipulate the real-time attributes of a process *chrt* [options] [_priority_] _command_ [_argument_...] -*chrt* [options] *--pid* [_priority_] _PID_ +*chrt --pid* [options] [_priority_] _PID_ == DESCRIPTION *chrt* sets or retrieves the real-time scheduling attributes of an existing _PID_, or runs _command_ with the given attributes. -== POLICIES +== POLICY OPTIONS *-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. @@ -122,19 +122,19 @@ ____ //TRANSLATORS: Keep {colon} untranslated Or set them{colon}:: ____ -*chrt* _policy-option_ *--pid* _priority PID_ +*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*{colon}:: ____ -*chrt -r --pid 30 1234* +*chrt --pid -r 30 1234* ____ Reset priorities to default for a process{colon}:: ____ -*chrt -o --pid 0* _PID_ +*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*){colon}:: ____ -*chrt -o -T 1000000 --pid* _PID_ +*chrt --pid -o -T 1000000* _PID_ ____ See *sched*(7) for a detailed discussion of the different scheduler classes and how they interact. diff --git a/schedutils/chrt.c b/schedutils/chrt.c index de1898160..b5ddc53bd 100644 --- a/schedutils/chrt.c +++ b/schedutils/chrt.c @@ -61,7 +61,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(USAGE_SEPARATOR, out); fputs(_("Set policy:\n" " chrt [options] [<priority>] <command> [<argument>...]\n" - " chrt [options] --pid [<priority>] <PID>\n"), out); + " chrt --pid <policy-option> [options] [<priority>] <PID>\n"), out); fputs(USAGE_SEPARATOR, out); fputs(_("Get policy:\n" " chrt --pid <PID>\n"), out); -- 2.48.2