summaryrefslogtreecommitdiffstats
path: root/schedutils
diff options
context:
space:
mode:
authorBenno Schulenberg2014-12-22 22:57:17 +0100
committerKarel Zak2015-01-06 11:27:38 +0100
commit451dbcfae1406f526208faf6033d6dcc8ac100da (patch)
tree594265cfbfad9989191ae3df877d7e6c300699a8 /schedutils
parentchsh: keep struct options in .rodata (diff)
downloadkernel-qcow2-util-linux-451dbcfae1406f526208faf6033d6dcc8ac100da.tar.gz
kernel-qcow2-util-linux-451dbcfae1406f526208faf6033d6dcc8ac100da.tar.xz
kernel-qcow2-util-linux-451dbcfae1406f526208faf6033d6dcc8ac100da.zip
textual: add a docstring to most of the utilities
This adds a concise description of a tool to its usage text. A first form of this patch was proposed by Steven Honeyman (see http://www.spinics.net/lists/util-linux-ng/msg09994.html). Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Diffstat (limited to 'schedutils')
-rw-r--r--schedutils/chrt.c2
-rw-r--r--schedutils/ionice.c3
-rw-r--r--schedutils/taskset.c4
3 files changed, 8 insertions, 1 deletions
diff --git a/schedutils/chrt.c b/schedutils/chrt.c
index 7988b2a03..fe4c179cb 100644
--- a/schedutils/chrt.c
+++ b/schedutils/chrt.c
@@ -57,8 +57,8 @@ static void __attribute__((__noreturn__)) show_usage(int rc)
{
FILE *out = rc == EXIT_SUCCESS ? stdout : stderr;
+ fputs(_("Show or change the real-time scheduling attributes of a process.\n"), out);
fprintf(out, _(
- "\nchrt - manipulate real-time attributes of a process\n"
"\nSet policy:\n"
" chrt [options] [<policy>] <priority> [-p <pid> | <command> [<arg>...]]\n"
"\nGet policy:\n"
diff --git a/schedutils/ionice.c b/schedutils/ionice.c
index fa43e4874..fb5d04a8b 100644
--- a/schedutils/ionice.c
+++ b/schedutils/ionice.c
@@ -108,6 +108,9 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
" %1$s [options] -u <uid>...\n"
" %1$s [options] <command>\n"), program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Show or change the I/O-scheduling class and priority of a process.\n"), out);
+
fputs(USAGE_OPTIONS, out);
fputs(_(" -c, --class <class> name or number of scheduling class,\n"
" 0: none, 1: realtime, 2: best-effort, 3: idle\n"), out);
diff --git a/schedutils/taskset.c b/schedutils/taskset.c
index 1bf1291cd..d6b21e45c 100644
--- a/schedutils/taskset.c
+++ b/schedutils/taskset.c
@@ -51,6 +51,10 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
_("Usage: %s [options] [mask | cpu-list] [pid|cmd [args...]]\n\n"),
program_invocation_short_name);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_("Show or change the CPU affinity of a process.\n"), out);
+ fputs(USAGE_SEPARATOR, out);
+
fprintf(out, _(
"Options:\n"
" -a, --all-tasks operate on all the tasks (threads) for a given pid\n"