Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I returned from a trip and noticed that my apartment had lost power. I am currently running a small Linux server (Ubuntu 8.04) and had to boot it back up.

Is there a way to read some log and see when it lost power?

Using last only shows when I booted it back up.

share|improve this question
up vote 3 down vote accepted

Check /var/log or /usr/var/log (dont know exactly where your distro stores this file but it should be one of those two) and look for any abrupt change between the time stamps or find the first occurrences of entries close to the output of the last command.

share|improve this answer

Check last | grep reboot. This will show you a list of boot times. On my Ubuntu 11.04 installation, this produces lines like:

reboot   system boot  2.6.38-13-generi Wed Dec 28 12:42 - 15:37 (1+02:55)
reboot   system boot  2.6.38-13-generi Tue Dec 27 07:33 - 15:37 (2+08:03)
reboot   system boot  2.6.38-13-generi Sat Dec 24 14:43 - 23:14 (2+08:31)
reboot   system boot  2.6.38-13-generi Fri Dec 23 11:07 - 16:29  (05:22)
reboot   system boot  2.6.38-13-generi Thu Dec 22 21:05 - 16:29  (19:23)

These mean that my system is up for

  • 1 day, 2 hours, 55 minutes
  • 2 days, 8 hours, 3 minutes
  • 2 days, 8 hours, 31 minutes
  • 5 hours 22 minutes
  • 19 hours 23 minutes

Hopefully Ubuntu 8.04 has the same feature.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.