From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: kerolasa@iki.fi
Subject: [PATCH 12/13] chrt: make command syntax easier to understand in usage()
Date: Tue, 2 Apr 2013 20:42:56 +0100 [thread overview]
Message-ID: <1364931777-2645-13-git-send-email-kerolasa@iki.fi> (raw)
In-Reply-To: <1364931777-2645-1-git-send-email-kerolasa@iki.fi>
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>
---
schedutils/chrt.1 | 11 ++++++++---
schedutils/chrt.c | 4 ++--
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/schedutils/chrt.1 b/schedutils/chrt.1
index b85717b..50aa841 100644
--- a/schedutils/chrt.1
+++ b/schedutils/chrt.1
@@ -91,8 +91,10 @@ Operate on an existing PID and do not launch a new task.
.TP
.B -r, --rr
Set scheduling policy to
-.BR SCHED_RR
-(the default).
+.BR SCHED_RR .
+When policy is not defined the
+.B SCHED_RR
+is used as default.
.TP
.B -R, --reset-on-fork
Add
@@ -123,7 +125,7 @@ You can also retrieve the real-time attributes of an existing task:
.I pid
.TP
Or set them:
-.B chrt \-p
+.B chrt \-r \-p
.I prio pid
.SH PERMISSIONS
A user must possess
@@ -138,6 +140,9 @@ and
.BR SCHED_RR
are part of POSIX 1003.1b Process Scheduling. The other scheduling attributes
may be ignored on some systems.
+.P
+Linux default scheduling policy is
+.BR SCHED_OTHER .
.SH AUTHOR
Written by Robert M. Love.
.SH COPYRIGHT
diff --git a/schedutils/chrt.c b/schedutils/chrt.c
index 60ec73e..20df6fa 100644
--- a/schedutils/chrt.c
+++ b/schedutils/chrt.c
@@ -62,9 +62,9 @@ static void __attribute__((__noreturn__)) show_usage(int rc)
fprintf(out, _(
"\nchrt - manipulate real-time attributes of a process\n"
"\nSet policy:\n"
- " chrt [options] <policy> <priority> {<pid> | <command> [<arg> ...]}\n"
+ " chrt [options] [-policy] <priority> [-p <pid> | <command> <arg> ...]\n"
"\nGet policy:\n"
- " chrt [options] {<pid> | <command> [<arg> ...]}\n"));
+ " chrt [options] -p <pid>\n"));
fprintf(out, _(
"\nScheduling policies:\n"
--
1.8.2
next prev parent reply other threads:[~2013-04-02 19:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-02 19:42 [PATCH 00/13] pull: fixes in preparation to v2.23 release Sami Kerola
2013-04-02 19:42 ` [PATCH 01/13] docs: fix type in mkfs.8 Sami Kerola
2013-04-02 19:42 ` [PATCH 02/13] newgrp: use xstrdup to check allocation succeeded Sami Kerola
2013-04-02 19:42 ` [PATCH 03/13] agetty: the command does not have -h and -V options Sami Kerola
2013-04-02 19:42 ` [PATCH 04/13] dmesg: fix usage() output consistancy Sami Kerola
2013-04-02 19:42 ` [PATCH 05/13] fsfreeze: tell user when mandatory option is not specified Sami Kerola
2013-04-02 19:42 ` [PATCH 06/13] losetup: allow -j option argument to be relative path Sami Kerola
2013-04-02 19:42 ` [PATCH 07/13] lscpu: fix error message Sami Kerola
2013-04-02 19:42 ` [PATCH 08/13] partx: remove deprecated option from usage() Sami Kerola
2013-04-02 19:42 ` [PATCH 09/13] setarch: add option to list settable architectures Sami Kerola
2013-04-05 12:04 ` Karel Zak
2013-04-02 19:42 ` [PATCH 10/13] setterm: fix various color option argument lists Sami Kerola
2013-04-02 19:42 ` [PATCH 11/13] vipw: add usage() function Sami Kerola
2013-04-02 19:42 ` Sami Kerola [this message]
2013-04-02 19:42 ` [PATCH 13/13] logger: make local sockets to try both stream and datagram Sami Kerola
2013-04-05 12:10 ` [PATCH 00/13] pull: fixes in preparation to v2.23 release Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1364931777-2645-13-git-send-email-kerolasa@iki.fi \
--to=kerolasa@iki.fi \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox