What can be a reason for last -x reboot
showing two last entries as still running
? Besides, I'm pretty sure I did not reboot this server December, 16, though it could be something with power on hosting provider. If that was the case, would this be expected result?
root@cthulhu-new ~ # last -x reboot
reboot system boot 4.13.0-0.bpo.1-a Sat Dec 16 06:26 still running
reboot system boot 4.13.0-0.bpo.1-a Thu Dec 7 07:56 still running
reboot system boot 4.13.0-0.bpo.1-a Wed Dec 6 11:10 - 07:55 (20:44)
wtmp begins Tue Dec 5 19:59:27 2017
Here's the output of last -x shutdown
which has no entry for Dec 16:
root@cthulhu-new ~ # last -x shutdown
shutdown system down 4.13.0-0.bpo.1-a Thu Dec 7 07:55 - 07:56 (00:00)
shutdown system down 4.13.0-0.bpo.1-a Wed Dec 6 11:10 - 11:10 (00:00)
wtmp begins Tue Dec 5 19:59:27 2017
Best Answer
Yes, it would be the expected result.
last
doesn’t know that your system was shut down on December 16, presumably because it wasn’t an orderly shut down (power loss or something like that). Because of the way it displays boots, it considers that the last two boots are still running.Things will sort themselves out to some extent the next time the system is shut down;
last
will then use the new shut down time for both December 7 and 16 boots.