Subject: misc/11667: Ruptime display
To: None <gnats-bugs@gnats.netbsd.org>
From: None <burgess@neonramp.com>
List: netbsd-bugs
Date: 12/08/2000 10:43:14
>Number: 11667
>Category: misc
>Synopsis: Many of my systems have uptimes in excess of 99 days. I
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: misc-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Fri Dec 08 10:43:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: Dave Burgess
>Release: 1.4.3
>Organization:
Nebraska On-Ramp
>Environment:
System: NetBSD mail2.neonramp.com 1.4.3 NetBSD 1.4.3 (NEONRAMP) #0: Sat Nov 25 14:14:02 CST 2000 root@webserv02.neonramp.com:/usr/src/sys/arch/i386/compile/NEONRAMP i386
>Description:
Here's an example:
admin up 12+22:21, 0 users, load 1.07, 1.08, 1.08
dbserver up 6+01:37, 0 users, load 0.09, 0.08, 0.08
firewall up 167+01:43, 0 users, load 0.11, 0.09, 0.08
ftp up 5+22:16, 0 users, load 0.12, 0.09, 0.08
fw up 119+03:46, 1 user, load 1.00, 1.02, 1.00
guardian up 109+20:02, 0 users, load 0.11, 0.08, 0.08
mail1 up 41+03:37, 0 users, load 0.58, 0.66, 0.64
mail2 up 6+00:31, 1 user, load 1.45, 1.29, 1.12
mail3 up 41+03:06, 0 users, load 0.62, 0.34, 0.30
mail4 up 166+23:46, 0 users, load 0.09, 0.11, 0.08
nfs up 66+22:40, 0 users, load 0.19, 0.14, 0.09
ns1 up 6+00:34, 0 users, load 0.18, 0.11, 0.08
radius1 down 8:39
radius2 up 5+22:24, 0 users, load 0.15, 0.21, 0.24
webserv01 up 12+19:38, 0 users, load 0.12, 0.16, 0.14
webserv02 up 12+21:50, 0 users, load 0.20, 0.17, 0.10
www2 up 8+03:15, 0 users, load 0.10, 0.14, 0.15
>How-To-Repeat:
Find a local network where rwhod is active and there are systems
which have been active for more than 100 days.
>Fix:
There are two lines in ruptime.c which need to be changed. The
first is the first %2d (which is a %3d in the code snippet
below). The second is adding a space in the second marked line
below. This code segment starts at line 213 in ruptime.c.
if (days)
(void)snprintf(resbuf, sizeof(resbuf),
! "%s %3d+%02d:%02d", updown, days, hours, minutes);
else
(void)snprintf(resbuf, sizeof(resbuf),
! "%s %2d:%02d", updown, hours, minutes);
return (resbuf);
>Release-Note:
>Audit-Trail:
>Unformatted:
would like the display string from ruptime to keep everything lines up
correctly, even if this is the case.