From owner-freebsd-current@FreeBSD.ORG Thu Feb 5 05:15:17 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BF26116A4F9 for ; Thu, 5 Feb 2004 05:15:17 -0800 (PST) Received: from ioskeha.hittite.isp.9tel.net (ioskeha.hittite.isp.9tel.net [62.62.156.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 502A443D46 for ; Thu, 5 Feb 2004 05:15:16 -0800 (PST) (envelope-from clefevre-lists@9online.fr) Received: from pc2k (unknown [81.185.160.179]) by ioskeha.hittite.isp.9tel.net (Postfix) with SMTP id 7DC4717BB94; Thu, 5 Feb 2004 14:15:14 +0100 (CET) Message-ID: <075c01c3ebea$178b36e0$7890a8c0@dyndns.org> From: "Cyrille Lefevre" To: "Poul-Henning Kamp" References: <42697.1075982191@critter.freebsd.dk> Date: Thu, 5 Feb 2004 14:15:13 +0100 Organization: ACME MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 cc: "current @FreeBSD.org" Subject: Re: wrong kern.boottime X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2004 13:15:17 -0000 "Poul-Henning Kamp" wrote: > In message <06ef01c3ebdd$36b53190$7890a8c0@dyndns.org>, "Cyrille Lefevre" write > s: > > >> ># last reboot > >> >reboot ~ Sun Feb 1 21:41 > >> ># ls -l /var/run/dmesg.boot > >> >< > >> >-rw-r--r-- 1 root wheel 5547 Feb 1 21:40 /var/run/dmesg.boot > >> ># sysctl kern.boottime > >> >kern.boottime: { sec = 1075812223, usec = 350585 } Tue Feb 3 13:43:43 2004 > >> ># uname -a > >> >FreeBSD gits 5.2-CURRENT FreeBSD 5.2-CURRENT #1: Sat Jan 31 15:17:05 CET 2004 > >> > > >> >any idea ? > >> > >> What does "date" say on your machine ? > > > ># date -u > >Thu Feb 5 11:39:36 UTC 2004 > ># date > >Thu Feb 5 12:39:39 CET 2004 > ># ls -l /etc/wall_cmos_clock > >-rw-r--r-- 1 root wheel 0 Jun 9 2001 /etc/wall_cmos_clock > > > >ntpd is running, so, I'm on time. > > Hmm, I'm not sure where last gets it's number from, maybe from utmp. no, from wtmp. > If the utmp record is written on boot before ntpd corrects the clock > that would be one explanation... > > Either way, I'm pretty sure that kern.boottime contains what it should > contain: Our best estimate of the time when the system was booted. absolutely not, the real boot time was the wtmp time which is the same as /var/run/dmesg.boot. a proof of the real boot time : # bzgrep Accounting /var/log/messages.* messages.2.bz2:Feb 1 21:40:43 gits kernel: Accounting enabled I forgot to give you what uptime says... # uptime 1:35PM up 1 day, 14:04, 2 users, load averages: 3.56, 4.63, 5.17 as well as snmpget : # snmpget -v2c -c public localhost HOST-RESOURCES-MIB::hrSystemUptime.0 HOST-RESOURCES-MIB::hrSystemUptime.0 2:22:59:31.12 Cyrille Lefevre. -- home: mailto:cyrille.lefevre@laposte.net