11

I need to know about the times the Ubuntu (14/16) went to sleep or woke up. are these logs kept somewhere? thanks

7

The favorite place for me (but not the only place) is accessed using:

gedit /var/log/syslog

To view older log records look at:

gedit /var/log/syslog.1
| improve this answer | |
  • 1
    Thanks for the answer but this file only keeps the logs of a few of previous hours and not longe and it doesn't keep the logs I needed – ePezhman Oct 27 '16 at 12:33
  • I updated the answer to look at older records. I'd older than that use '.2', '.3', etc. – WinEunuuchs2Unix Oct 27 '16 at 14:51
9

In case your Ubuntu is using systemd, you can use:

journalctl | grep systemd-sleep

You should get something like:

Jul 31 16:02:51 johndoe systemd-sleep[5958]: Suspending system...
Aug 01 15:34:03 johndoe systemd-sleep[25509]: Suspending system...
Aug 02 09:01:40 johndoe systemd-sleep[25509]: System resumed.
Aug 02 16:59:16 johndoe systemd-sleep[23496]: Suspending system...
Aug 06 08:46:04 johndoe systemd-sleep[23496]: System resumed.
Aug 06 17:05:08 johndoe systemd-sleep[6071]: Suspending system...
Aug 07 08:41:33 johndoe systemd-sleep[6071]: System resumed.
Aug 07 16:48:01 johndoe systemd-sleep[14495]: Suspending system...
Aug 08 09:06:48 johndoe systemd-sleep[14495]: System resumed.
Aug 08 16:38:55 johndoe systemd-sleep[14729]: Suspending system...
Aug 09 07:53:48 johndoe systemd-sleep[14729]: System resumed.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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