DragonFly BSD
DragonFly bugs List (threaded) for 2004-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

wrong uptime


From: YONETANI Tomokazu <qhwt+dragonfly-bugs@xxxxxxxxxx>
Date: Sat, 3 Apr 2004 12:46:59 +0900

Hello.
Is anyone else seeing incorrect uptime like this? I've been seeing this
(and sometimes negative uptime) since the last changes to the clock code.

$ uptime; last -4 reboot shutdown
12:32PM  up 2 days, 14:46, 2 users, load averages: 0.00, 0.03, 0.00
reboot           ~                         Sat Apr  3 11:53
shutdown         ~                         Wed Mar 31 21:46
reboot           ~                         Wed Mar 31 20:46
shutdown         ~                         Sat Mar 27 18:59

uptime(1) uses kern.boottime to calculate the period of time since boot,
but now kern.boottime seems to answer the last shutdown time, and
kern.basetime is what does the job.

$ sysctl kern.boottime kern.basetime
kern.boottime: { sec = 1080737205, usec = 890150874 } Wed Mar 31 21:46:45 2004
kern.basetime: { sec = 1080960819, usec = 890099279 } Sat Apr  3 11:53:39 2004



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]