Project

General

Profile

Bug #4363

After hard reboot last(1) reports wrong boot time

Added by Marcel Telka about 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
cmd - userland programs
Start date:
2013-11-27
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

I rebooted my virtual machine based on illumos by killing the virtual machine and booting it back. After the boot I noticed the time of boot as shown by last(1) is not correct:

# last|head
root      pts/3        10.0.1.26        Wed Nov 27 14:14   still logged in
root      sshd         10.0.1.26        Wed Nov 27 14:14   still logged in
admin     pts/2        10.0.1.26        Wed Nov 27 14:13   still logged in
admin     sshd         10.0.1.26        Wed Nov 27 14:13 - 14:14  (00:01)
root      pts/1        10.0.1.26        Wed Nov 27 14:11   still logged in
root      sshd         10.0.1.26        Wed Nov 27 14:11 - 14:13  (00:01)
reboot    system boot                   Wed Nov 27 13:06 
reboot    system down                   Wed Nov 27 14:04 
admin     pts/2        10.0.1.26        Wed Nov 27 13:59 - 14:04  (00:04)
admin     sshd         10.0.1.26        Wed Nov 27 13:59 - 14:04  (00:04)
#

The difference is one hour in past. Since my current timezone is UTC+0100 it is likely that the boot time is in UTC, while all other timestamps are in the local TZ.

Probably because of this issue the uptime(1) shows longer uptime than it is in reality (please note that I rebooted the machine at ca 14:05 CET):

# date ; uptime
Wed Nov 27 14:29:15 CET 2013
 14:29pm  up   1:22,  3 users,  load average: 0.04, 0.05, 0.07
#

When I rebooted the same machine using the reboot(1m) command the boot time is listed correctly:

# last|head -20|tail
root      pts/1        10.0.1.26        Wed Nov 27 13:59 - 14:04  (00:05)
root      sshd         10.0.1.26        Wed Nov 27 13:59 - 13:59  (00:00)
reboot    system boot                   Wed Nov 27 13:53 
reboot    system down                   Wed Nov 27 13:53 
root      pts/1        10.0.1.26        Wed Nov 27 13:50 - 13:53  (00:03)
root      sshd         10.0.1.26        Wed Nov 27 13:50 - down   (00:03)
root      pts/2        10.0.1.26        Wed Nov 27 11:55 - 12:06  (00:10)
root      sshd         10.0.1.26        Wed Nov 27 11:55 - 12:06  (00:10)
root      pts/1        10.0.1.26        Wed Nov 27 03:47 - 12:06  (08:18)
root      sshd         10.0.1.26        Wed Nov 27 03:47 - 11:55  (08:08)
#

Also available in: Atom PDF