From: Zbigniew Jędrzejewski-Szmek Date: Wed, 3 Dec 2025 14:23:12 +0000 (+0100) Subject: cgtop: fix confusion in --help X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb406988ac587a0f2b75948f3fab860005d6bc76;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. --- diff --git a/src/cgtop/cgtop.c b/src/cgtop/cgtop.c index bb1b256902b..60181caffc1 100644 --- a/src/cgtop/cgtop.c +++ b/src/cgtop/cgtop.c @@ -702,13 +702,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"