Subject: bin/5318: ruptime displays crap for hosts up > 1 year
To: None <gnats-bugs@gnats.netbsd.org>
From: Heiko W.Rupp <hwr@pilhuhn.de>
List: netbsd-bugs
Date: 04/19/1998 15:43:07
>Number:         5318
>Category:       bin
>Synopsis:       ruptime displays crap for hosts up > 1 year
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 19 06:50:01 1998
>Last-Modified:
>Originator:     Heiko W.Rupp
>Organization:
>Release:        1.1
>Environment:
	
System: NetBSD snert.pilhuhn.de 1.1 NetBSD 1.1 (SNERT+PPP) #11: Thu Jan 30 11:00:49 MET 1997 hwr@snert.pilhuhn.de:/usr/src/sys/arch/i386/compile/SNERT+PPP i386


>Description:

snert!103> uptime ; ruptime
 3:40PM  up 366 days,  4:58, 6 users, load averages: 1.36, 1.19, 1.11

dr            up 10+01:41,     0 users,  load 1.09, 1.10, 1.08
pilhuhn       up 64+21:24,     5 users,  load 0.00, 0.00, 0.00
quaak         up 42+22:16,     0 users,  load 1.05, 1.07, 1.07
snert            up ??:??,     3 users,  load 1.22, 1.14, 1.09
              ^^^^^^^^^^^^^^

This can also be found in NetBSD 1.3 (ruptime.c,v 1.6 1997/10/19)

>How-To-Repeat:
 
 	See above

>Fix:

  in interval(tval, updown) (ruptime.c) change

        if (tval < 0 || tval > DAYSPERNYEAR * SECSPERDAY) {

to

        if (tval < 0 ) {

>Audit-Trail:
>Unformatted: