[FYI] "last -f <old wtmp> -x reboot shutdown" incorrect for last reboot and shutdown
Hello :)
Further to this LQ thread which Tinkster solved by suggesting the last command (thanks Tinkster) I have been exploring last -x reboot and have found that the reported duration is incorrect for the last reboot and shutdown when a old wtmp file is used. Not having a record for the following shutdown, last assumes that the system has been up until the current time and similarly for the shutdown. The output comes in time order, latest first, each line showing the time of the reboot and the uptime from then to shutdown. Using last -x reboot shutdown to show the shutdown time, here's an illustration Code:
shutdown system down 2.6.29.6-smp Sun Mar 7 15:35 - 03:02 (11:27) When the uptime exceeds 24 hours it is shown as (<days>+<hours:minutes) like this Code:
shutdown system down 2.6.29.6-smp Sun Feb 21 12:39 - 13:20 (00:40) The time in parentheses at the end of the shutdown lines is normally the time until the next shutdown. So far so good. The incorrect output is for the last reboot and shutdown of an old wtmp file. Here's the output of last /var/log/wtmp -x reboot shutdown; last -f /var/log/wtmp.1 -x reboot shutdown Code:
[snip] Best Charles |
Taking this thread off the zero reply list.
|
All times are GMT -5. The time now is 04:43 PM. |