Subject: bin/18132: ruptime formating rules
To: None <gnats-bugs@gnats.netbsd.org>
From: Stephen Jones <smj@sdf.lonestar.org>
List: netbsd-bugs
Date: 08/30/2002 22:07:04
>Number:         18132
>Category:       bin
>Synopsis:       ruptime formating rules
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 30 15:08:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Stephen Jones
>Release:        NetBSD 1.5.3
>Organization:
SDF Public Access UNIX System
>Environment:
alpha netbsd 
System: NetBSD sdf 1.5.3_ALPHA NetBSD 1.5.3_ALPHA (SDF) #0: Mon Mar 18 17:42:40 UTC 2002 alpha


>Description:

ruptime -a output doesn't pretty print when servers have been up for 100+ days:

bjork         up 17+21:29,     0 users,  load 1.15, 1.12, 1.08
droog         up 100+03:16,     9 users,  load 2.20, 1.68, 1.37
norge         up 100+03:21,     0 users,  load 0.06, 0.07, 0.07
otaku         up  1+03:24,    41 users,  load 8.43, 8.50, 8.91
sdf           up  1+03:24,    41 users,  load 4.64, 5.53, 6.00
sverige       up 100+03:22,     0 users,  load 0.16, 0.20, 0.17

>How-To-Repeat:

Run at least one NetBSD machine w/ 'rwhod' for over 100 days and one with
less than 100 days uptime.

>Fix:

Change line 177 of src/usr.bin/ruptime.c from:

"%-12.12s%s,  %4d user%s  load %*.2f, %*.2f, %*.2f\n",

to

"%-13.12s%s,  %4d user%s  load %*.2f, %*.2f, %*.2f\n",
>Release-Note:
>Audit-Trail:
>Unformatted: