From owner-freebsd-current Tue Jul 28 04:31:04 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA24803 for freebsd-current-outgoing; Tue, 28 Jul 1998 04:31:04 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.15.68.22]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA24708; Tue, 28 Jul 1998 04:30:34 -0700 (PDT) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id VAA32437; Tue, 28 Jul 1998 21:29:50 +1000 Date: Tue, 28 Jul 1998 21:29:50 +1000 From: Bruce Evans Message-Id: <199807281129.VAA32437@godzilla.zeta.org.au> To: dwhite@resnet.uoregon.edu, smoergrd@oslo.geco-prakla.slb.com Subject: Re: Strange idle times Cc: current@FreeBSD.ORG, kong@kong.spb.ru, phk@FreeBSD.ORG Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >I checked, and I have the same problem on my -current box. All my vtys >and ptys show up with as much idle time as the machine's uptime. I ssh >a lot öut"from this box, but very little *into* it, so the fubared >ptys are mostly xterms. Strange idle times used to be caused by mounting with -noatime. I fixed this a few weeks ago by ignoring -noatime for special files. Yesterday I enabled a better optimization for all timestamps on special files. Perhaps something in you configuration breaks this optimization. >On my laptop (also running -current), I have an xterm which shows up >with twice as much idle time as the machine's uptime, though that is >caused by a bug (feature?) in the uptime calculation (time during >which the machine is suspended isn't counted as uptime) Bug. APM calls inittodr() and inittodr() calls set_timecounter(). set_timecounter() does extra work to mess up the boot time :-). This is also a problem in settimeofday(). Suppose that the boot time and the current time were originally set correctly, but the current time has drifted and you're calling settimeofday() to fix it. Then the boot time hasn't changed, so it shouldn't be adjusted, but it is. This is essentially the same problem as in APM. OTOH, when both the boot time and the current time are initially set incorrectly because the RTC is on wall clock time or just slightly wrong, then settimeofday needs to adjust both. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message