From: Zbigniew Jędrzejewski-Szmek Date: Wed, 3 Dec 2025 14:23:12 +0000 (+0100) Subject: cgtop: fix confusion in --help X-Git-Tag: v257.11~67 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2c86906e7f1f6fc735134bec400e5f14fb64d722;p=thirdparty%2Fsystemd.git cgtop: fix confusion in --help When we say '-n --iterations=N' in --help, this means that the program can be invoked with '-n N' or '--iterations=N' or '--iterations N'. (The short option is specified without the argument.) Here we tried to use '-p --order=path' to mean that the program can be invoked with '-p' or '--order=path', but that is incompatible with the established convention. Also, indicate that the arg to --cpu is optional. (cherry picked from commit cb406988ac587a0f2b75948f3fab860005d6bc76) (cherry picked from commit 8523627f2197ef6d448d97832b946e42cd414fc3) (cherry picked from commit 7f08d7160bbef89aac3df7f7fe93689965aaec6b) --- diff --git a/src/cgtop/cgtop.c b/src/cgtop/cgtop.c index 08eae5988b0..85e74f77a35 100644 --- a/src/cgtop/cgtop.c +++ b/src/cgtop/cgtop.c @@ -713,13 +713,18 @@ static int help(void) { "Show top control groups by their resource usage.\n\n" " -h --help Show this help\n" " --version Show package version\n" - " -p --order=path Order by path\n" - " -t --order=tasks Order by number of tasks/processes\n" - " -c --order=cpu Order by CPU load (default)\n" - " -m --order=memory Order by memory load\n" - " -i --order=io Order by IO load\n" + + " --order=path|tasks|cpu|memory|io\n" + " Order by specified property\n" + " -p Same as --order=path, order by path\n" + " -t Same as --order=tasks, order by number of\n" + " tasks/processes\n" + " -c Same as --order=cpu, order by CPU load\n" + " -m Same as --order=memory, order by memory load\n" + " -i Same as --order=io, order by IO load\n" " -r --raw Provide raw (not human-readable) numbers\n" - " --cpu=percentage Show CPU usage as percentage (default)\n" + " --cpu[=percentage]\n" + " Show CPU usage as percentage (default)\n" " --cpu=time Show CPU usage as time\n" " -P Count userspace processes instead of tasks (excl. kernel)\n" " -k Count all processes instead of tasks (incl. kernel)\n"