top(1): increase number of columns for memory
The original intention was 4 columns but with a usable a result. In practice this was not the case. Increase the number of columns to 5 until humanize_number learns alternative ways of presenting the number. Requested by: many Ref D15801
This commit is contained in:
parent
5add92953e
commit
10550f0b0a
@ -388,7 +388,7 @@ format_header(const char *uname_field)
|
||||
sbuf_printf(header, "%*s", ps.jail ? TOP_JID_LEN : 0,
|
||||
ps.jail ? " JID" : "");
|
||||
sbuf_printf(header, " %-*.*s ", namelength, namelength, uname_field);
|
||||
sbuf_cat(header, "THR PRI NICE SIZE RES ");
|
||||
sbuf_cat(header, "THR PRI NICE SIZE RES ");
|
||||
if (ps.swap) {
|
||||
sbuf_printf(header, "%*s ", TOP_SWAP_LEN - 1, "SWAP");
|
||||
}
|
||||
@ -1064,8 +1064,8 @@ format_next_process(struct handle * xhandle, char *(*get_userid)(int), int flags
|
||||
|
||||
sbuf_printf(procbuf, "%3d ", pp->ki_pri.pri_level - PZERO);
|
||||
sbuf_printf(procbuf, "%4s", format_nice(pp));
|
||||
sbuf_printf(procbuf, "%6s ", format_k(PROCSIZE(pp)));
|
||||
sbuf_printf(procbuf, "%5s ", format_k(pagetok(pp->ki_rssize)));
|
||||
sbuf_printf(procbuf, "%7s ", format_k(PROCSIZE(pp)));
|
||||
sbuf_printf(procbuf, "%6s ", format_k(pagetok(pp->ki_rssize)));
|
||||
if (ps.swap) {
|
||||
sbuf_printf(procbuf, "%*s ",
|
||||
TOP_SWAP_LEN - 1,
|
||||
|
@ -297,7 +297,7 @@ format_k(int64_t amt)
|
||||
|
||||
ret = retarray[index];
|
||||
index = (index + 1) % NUM_STRINGS;
|
||||
humanize_number(ret, 5, amt * 1024, "", HN_AUTOSCALE, HN_NOSPACE);
|
||||
humanize_number(ret, 6, amt * 1024, "", HN_AUTOSCALE, HN_NOSPACE);
|
||||
return (ret);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user