mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
top(1): increase field with width for W/CPU column
This allows 3 digit CPU columns to look nice Reported by: feld
This commit is contained in:
1 parent
a3d799fbb5
commit
8d3f65e767
1 file changed
+2
-2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=335601
@@ -398,7 +398,7 @@ format_header(const char *uname_field)
|
||||
sbuf_cat(header, "C ");
|
||||
}
|
||||
sbuf_cat(header, "TIME ");
|
||||
sbuf_printf(header, "%6s ", ps.wcpu ? "WCPU" : "CPU");
|
||||
sbuf_printf(header, " %6s ", ps.wcpu ? "WCPU" : "CPU");
|
||||
sbuf_cat(header, "COMMAND");
|
||||
sbuf_finish(header);
|
||||
break;
|
||||
@@ -1084,7 +1084,7 @@ format_next_process(struct handle * xhandle, char *(*get_userid)(int), int flags
|
||||
}
|
||||
sbuf_printf(procbuf, "%3d ", cpu);
|
||||
}
|
||||
sbuf_printf(procbuf, "%6s", format_time(cputime));
|
||||
sbuf_printf(procbuf, "%6s ", format_time(cputime));
|
||||
sbuf_printf(procbuf, "%6.2f%% ", ps.wcpu ? 100.0 * weighted_cpu(PCTCPU(pp), pp) : 100.0 * PCTCPU(pp));
|
||||
}
|
||||
sbuf_printf(procbuf, "%.*s",
|
||||
|
||||
Reference in new issue
Block a user