Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Jul 1995 09:03:01 -0400 (EDT)
From:      "Jonathan M. Bresler" <jmb@kryten.Atinc.COM>
To:        root@xaa.stack.urc.tue.nl
Cc:        freebsd-hackers@freefall.cdrom.com
Subject:   Re: bin/626: ruptime doesn't like big uptimes
Message-ID:  <Pine.3.89.9507200920.B15742-0100000@kryten.atinc.com>
In-Reply-To: <199507201140.EAA05000@freefall.cdrom.com>

next in thread | previous in thread | raw e-mail | index | archive | help

did someone disparage FreeBSD uptime vs Linux ??

now i dont know what they are using this machine for at their site.   but 
surely if this had happened before it would have been fixed in the 4.3BSD 
release this kernel must be based on. ;))


On Thu, 20 Jul 1995 root@xaa.stack.urc.tue.nl wrote:

> 
> >Number:         626
> >Category:       bin
> >Synopsis:       ruptime doesn't like uptimes > 1 year
> >Confidential:   no
> >Severity:       non-critical
> >Priority:       low
> >Responsible:    freebsd-bugs (FreeBSD bugs mailing list)
> >State:          open
> >Class:          change-request
> >Submitter-Id:   current-users
> >Arrival-Date:   Thu Jul 20 04:40:01 1995
> >Originator:     Mark Huizer
> >Organization:
> Stack, Eindhoven University of Technology
> >Release:        FreeBSD 2.0-BUILT-19950622 i386
> >Environment:
> 
>   Network with a machine that is 377 days up
> 
> >Description:
> 
>   A machine with uptime >1 year appears wrong in the ruptime list
> 
> >How-To-Repeat:
> 
>   ruptime at our domain gives...
>  at            up  9+03:35,     0 users,  load 0.00, 0.00, 0.00
>  drakar        up  2+23:12,     0 users,  load 0.00, 0.00, 0.00
>  gem              up ??:??,     0 users,  load 0.00, 0.00, 0.00
>  sensus      down    21:43
>  skynet        up 13+15:30,     0 users,  load 0.23, 0.10, 0.08
>  snail         up     4:52,     0 users,  load 0.04, 0.03, 0.07
>  terra         up 29+02:40,     2 users,  load 0.30, 0.23, 0.00
>  test1         up 12+20:58,     2 users,  load 0.00, 0.00, 0.00
>  test2         up 33+21:24,     1 user,   load 0.01, 0.01, 0.00
>  test4         up  2+19:55,     0 users,  load 0.00, 0.00, 0.00
>  triple        up 16+11:29,     4 users,  load 1.06, 1.01, 1.02
>  turtle        up  1+21:15,    17 users,  load 0.68, 0.75, 0.69
>  www2          up     0:31,     1 user,   load 0.00, 0.00, 0.00
>  xaa           up     0:40,     4 users,  load 0.06, 0.06, 0.01
>  zen           up  3+21:15,     7 users,  load 0.12, 0.12, 0.14
> >Fix:
> 
> *** ruptime.c	Wed Jun 14 13:35:30 1995
> --- ruptime.c.new	Thu Jul 20 13:27:36 1995
> ***************
> *** 196,203 ****
>   	static char resbuf[32];
>   	int days, hours, minutes;
>   
> ! 	if (tval < 0 || tval > DAYSPERNYEAR * SECSPERDAY) {
> ! 		(void)snprintf(resbuf, sizeof(resbuf), "   %s ??:??", updown);
>   		return (resbuf);
>   	}
>   						/* round to minutes. */
> --- 196,203 ----
>   	static char resbuf[32];
>   	int days, hours, minutes;
>   
> ! 	if (tval < 0 /* || tval > DAYSPERNYEAR * SECSPERDAY */ ) {
> ! 		(void)snprintf(resbuf, sizeof(resbuf), "   %s   ??:??", updown);
>   		return (resbuf);
>   	}
>   						/* round to minutes. */
> ***************
> *** 208,217 ****
>   	hours %= HOURSPERDAY;
>   	if (days)
>   		(void)snprintf(resbuf, sizeof(resbuf),
> ! 		    "%s %2d+%02d:%02d", updown, days, hours, minutes);
>   	else
>   		(void)snprintf(resbuf, sizeof(resbuf),
> ! 		    "%s    %2d:%02d", updown, hours, minutes);
>   	return (resbuf);
>   }
>   
> --- 208,217 ----
>   	hours %= HOURSPERDAY;
>   	if (days)
>   		(void)snprintf(resbuf, sizeof(resbuf),
> ! 		    "%s %4d+%02d:%02d", updown, days, hours, minutes);
>   	else
>   		(void)snprintf(resbuf, sizeof(resbuf),
> ! 		    "%s      %2d:%02d", updown, hours, minutes);
>   	return (resbuf);
>   }
>   
> >Audit-Trail:
> >Unformatted:
> 
> 
> 

Jonathan M. Bresler  jmb@kryten.atinc.com       | Analysis & Technology, Inc.  
FreeBSD Postmaster   jmb@FreeBSD.Org            | 2341 Jeff Davis Hwy
play go.                                        | Arlington, VA 22202
ride bike. hack FreeBSD.--ah the good life      | 703-418-2800 x346




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.3.89.9507200920.B15742-0100000>