Date: Thu, 16 Sep 2010 22:38:27 +0000 (UTC) From: "David E. O'Brien" <obrien@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r212771 - head/usr.bin/ruptime Message-ID: <201009162238.o8GMcRA2009305@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: obrien Date: Thu Sep 16 22:38:27 2010 New Revision: 212771 URL: http://svn.freebsd.org/changeset/base/212771 Log: 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. Modified: head/usr.bin/ruptime/ruptime.c Modified: head/usr.bin/ruptime/ruptime.c ============================================================================== --- head/usr.bin/ruptime/ruptime.c Thu Sep 16 22:31:03 2010 (r212770) +++ head/usr.bin/ruptime/ruptime.c Thu Sep 16 22:38:27 2010 (r212771) @@ -244,12 +244,12 @@ ruptime(const char *host, int aflg, int for (i = 0; i < (int)nhosts; i++) { hsp = &hs[i]; 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")); continue; } (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, interval((time_t)hsp->hs_wd->wd_sendtime - (time_t)hsp->hs_wd->wd_boottime, " up"),
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009162238.o8GMcRA2009305>