[systemd-devel] [PATCH] cgtop: Add cpu time opt and become stdout sensitive
Lennart Poettering
lennart at poettering.net
Fri Apr 5 08:44:34 PDT 2013
On Tue, 02.04.13 18:52, Umut Tezduyar (umut at tezduyar.com) wrote:
> + if (arg_cpu_type == CPU_PERCENT)
> + if (g->cpu_valid)
> + printf(" %6.1f", g->cpu_fraction*100);
> + else
> + fputs(" -", stdout);
> else
> - fputs(" -", stdout);
> + printf(" %*"PRIu64, maxtcpu, g->cpu_usage)
I wonder if this is something where format_timespan() would be
useful?
Or do you want to process this further and thus want a raw value? For
humans the result of format_timespan() should be a lot more useful
though...
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list