Increase the hostname display width. Many machines are named
with >12 characters. This still allows for 80 column output with load averages of 99.99, 99.99, 99.99.
This commit is contained in:
parent
9b91846ce4
commit
e5bc6d56e8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=212771
@ -244,12 +244,12 @@ ruptime(const char *host, int aflg, int (*cmp)(const void *, const void *))
|
|||||||
for (i = 0; i < (int)nhosts; i++) {
|
for (i = 0; i < (int)nhosts; i++) {
|
||||||
hsp = &hs[i];
|
hsp = &hs[i];
|
||||||
if (ISDOWN(hsp)) {
|
if (ISDOWN(hsp)) {
|
||||||
(void)printf("%-12.12s%s\n", hsp->hs_wd->wd_hostname,
|
(void)printf("%-25.25s%s\n", hsp->hs_wd->wd_hostname,
|
||||||
interval(now - hsp->hs_wd->wd_recvtime, "down"));
|
interval(now - hsp->hs_wd->wd_recvtime, "down"));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
(void)printf(
|
(void)printf(
|
||||||
"%-12.12s%s, %4d user%s load %*.2f, %*.2f, %*.2f\n",
|
"%-25.25s%s, %4d user%s load %*.2f, %*.2f, %*.2f\n",
|
||||||
hsp->hs_wd->wd_hostname,
|
hsp->hs_wd->wd_hostname,
|
||||||
interval((time_t)hsp->hs_wd->wd_sendtime -
|
interval((time_t)hsp->hs_wd->wd_sendtime -
|
||||||
(time_t)hsp->hs_wd->wd_boottime, " up"),
|
(time_t)hsp->hs_wd->wd_boottime, " up"),
|
||||||
|
Loading…
Reference in New Issue
Block a user