How to find out the time Linux machine have spent in sleep

0

Everyone knows that command uptime shows running time of Linux machine. Is there a similar command for sleep and/or hibernate mode? To be clear: I want to know wake up time of my system.

Aleksandr Kravets

Posted 2013-04-25T07:02:12.423

Reputation: 107

Question was closed 2013-04-25T16:18:10.800

Answers

2

Possible Duplicate:
How to find the uptime since last wake from standby

Top Answer:
"In /var/log/pm-suspend.log, look for the last line looking like this one:

Sun Dec 16 09:30:31 CET 2012: Awake. That's your last wakeup time. You can calculate your uptime since then the way Paul suggested."
-Steps

Will.Beninger

Posted 2013-04-25T07:02:12.423

Reputation: 1 402

Nice hint. But is there more simple way like one short command? Otherwise i'll need to write parsing script... – Aleksandr Kravets – 2013-04-25T08:55:45.597

Unfortunately there is no short command that I know of. A quick parsing script that does the calculation for you put in the path might be the simplest way if you need to look this up frequently.

Alternatively, as the other question mentioned, if you are scripting your sleep/hibernate you could output to a log file that is more easily read. Depends on your implementation. – Will.Beninger – 2013-04-25T09:20:30.580