I let my RPi on yesterday with several scripts open and running. But when I came back today, all the scripts were closed, like if the RPI rebooted. I read that Raspbian, contrary to Windows, is not doing auto-update. So, I don't know what happened.

It doesn't look like Power failure, because I was using the same power delivery (5 V - 3 A) for a while without any problems. But I cannot exclude there was no blackout in the building, I don't know that.

Are there any log file that could tell me what happened during the night?

Thanks in advance.

[EDIT] Here the last entries of the last -x command (without pi user): (I set up everything around 18h yesterday (25th), and discovered the problem around 15h today (26th). I rebooted the Pi manually at 15h56)

runlevel (to lvl 5)   5.4.72-v7l+      Tue Jan 26 15:56   still running
reboot   system boot  5.4.72-v7l+      Thu Jan  1 09:00   still running
shutdown system down  5.4.72-v7l+      Tue Jan 26 15:56 - 09:00 (-18653+06:56)
runlevel (to lvl 5)   5.4.72-v7l+      Mon Jan 25 17:23 - 15:56  (22:33)
reboot   system boot  5.4.72-v7l+      Thu Jan  1 09:00 - 15:56 (18653+06:56)
  • look at the output of last -x ... if there was a power failure, you'll see (ignoring the user entries) a sequence of runlevel, reboot, runlevel - the last runlevel being from the previous boot ... whereas a controlled reboot results in runlevel, reboot, shutdown ... now you should be able to determine if you indeed had a power failure – Jaromanda X Jan 26 at 6:25
  • Thanks for the command. I cannot see any power failure between yesterday and today. So I don't know what happened :/ – Dark Patate Jan 26 at 9:13
  • so, only proper reboots - you can also see if the pi has rebooted using the uptime command - this will tell you how long it's been running since the last boot - regardless if it was reboot or power off/on – Jaromanda X Jan 26 at 9:13
  • You should take a few minutes to read this related Q&A on reboot – Seamus Jan 26 at 9:19
  • I'm not totally sure as the orders of the entries from last -x are a bit strange. I edited my post with a copy of the last 2 days. I'll look you link @Seamus – Dark Patate Jan 26 at 9:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.