wrong uptime
YONETANI Tomokazu
qhwt+dragonfly-bugs at les.ath.cx
Fri Apr 2 19:48:33 PST 2004
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
More information about the Bugs
mailing list