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


2 Answers 2


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.

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
  • 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, 2016 at 12:33
  • I updated the answer to look at older records. I'd older than that use '.2', '.3', etc. Oct 27, 2016 at 14:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .