spookiepower wrote: ↑
Sat May 18, 2019 7:48 pm
is there some kind of logfile I can look into, to see when it was turned on and when it did shotdown/ran out of power ?
What I do is put commands in crontab to echo the reboot time to a file.
To monitor how long it ran before shutting down, you can put commands to echo the current time to a file. How frequently depends on the resolution you want. I've done it with 4 hour intervals.
Code: Select all
@reboot sleep 60; echo REBOOT `date` >> uptime.log
0 0 * * * echo `date` >> uptime.log
0 */4 * * * uptime >> uptime.log
The sleep is to let the OS set the correct time.