Some time ago I required to find out when my laptop "went to bed" and when it "woke up". And I have found that it is not so simple as I would expect, and even worse, I didn't find a response on StackOverflow. So I responded to a similar question.
But in Kubuntu 22.04 the log message changed, so I changed the command to the following form. The zgrep command can search also in compressed syslog files:
sudo zgrep -e 'systemd-sleep' /var/log/syslog* | grep -e "Entering sleep state\|System returned from sleep"
The output is not ordered, but I am lazy to implement it, it would be also much more than I needed.
Žádné komentáře:
Okomentovat