I want to know the uptime since the last wake from standby.
The command uptime
only shows the difference between current time minus the last startup time.
linuxstandbyuptime
I want to know the uptime since the last wake from standby.
The command uptime
only shows the difference between current time minus the last startup time.
Best Answer
In
/var/log/pm-suspend.log
, look for the last line looking like this one:That's your last wakeup time. You can calculate your uptime since then the way Paul suggested.
Periodically your
logrotate
will "rotate" logs to prevent them from growing too big, so you may find an emptypm-suspend.log
file. In this case, just look for thepm-suspend.log.1
file (you may find also other log files named likepm-suspend.log.2.gz
and so on; you can examine them usingzcat
orzless
).