Hi, my pi zero 2w sometimes stops responding and services go offline — I can’t even ssh into it. The only way to fix it is by rebooting it.
How can I check what caused the crash after rebooting?
Thanks.
Hi, my pi zero 2w sometimes stops responding and services go offline — I can’t even ssh into it. The only way to fix it is by rebooting it.
How can I check what caused the crash after rebooting?
Thanks.
enable persistent system logs:
dietpi-software uninstall 103 # uninstalls DIetPi-RAMlog
mkdir /var/log/journal # triggers systemd-journald logs to disk
reboot # required to finalise the RAMlog uninstall
Then you can check system logs via:
journalctl
which will then show as well logs from previous boot sessions. To limit the size, you can additionally e.g. apply the following:
mkdir -p /etc/systemd/journald.conf.d
cat << '_EOF_' > /etc/systemd/journald.conf.d/99-custom.conf
[Journal]
SystemMaxFiles=2
MaxFileSec=7day
_EOF_
This will limit logs to 14 days split across two journal files, so that with rotation you will always have between 7 and 14 days of logs available.
I guess that for SD cards that is not recommended to leave enabled after finding the cause right due to I/O and lifespan of the card. Also, any particular tool that you recommend that shows the “health” of the SD card? Thanks.
personally I’m not aware on such a tool
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.