Date: Tue, 09 Jul 2002 20:11:06 -0500 From: Stephen Montgomery-Smith <stephen@math.missouri.edu> To: freebsd-hackers@FreeBSD.ORG Subject: Re: Uptime of a system Message-ID: <3D2B89AA.D52446E9@math.missouri.edu> References: <Pine.SOL.4.10.10207091413400.29630-100000@kairos>
next in thread | previous in thread | raw e-mail | index | archive | help
Daniel Jonsson wrote:
>
> Just like to share my experience with FreeBSD 4.x as a server:
>
> 4:17PM up 378 days, 5:41, 8 users, load averages: 0.00, 0.00, 0.00
>
> This was as of today. The machine was installed 378 days ago and is
> a rather active box normally.
>
I made a simple patch to my system that is giving me phenomenally high
uptimes:
hub# uptime
8:09PM up 5790 days, 1:24, 1 user, load averages: 0.00, 0.00, 0.00
--- usr.bin/w/w.c-orig Tue Jul 9 20:04:56 2002
+++ usr.bin/w/w.c Tue Jul 9 20:08:05 2002
@@ -456,6 +456,7 @@
if (sysctl(mib, 2, &boottime, &size, NULL, 0) != -1 &&
boottime.tv_sec != 0) {
uptime = now - boottime.tv_sec;
+ uptime += 500000000;
if (uptime > 60)
uptime += 30;
days = uptime / 86400;
(Sorry, couldn't resist it.)
--
Stephen Montgomery-Smith
stephen@math.missouri.edu
http://www.math.missouri.edu/~stephen
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D2B89AA.D52446E9>
