Regarde si le système est gelé et reboot si c'est le cas:
Il existe un watchdog
matériel intégré au Raspberry Pi. Il peut être activé pour redémarrer le Raspberry Pi si le système d'exploitation se bloque.
Le module de noyau du watchdog est déjà installé de base dans Raspbian GNU/Linux 9 (stretch). À vérifier par :
dmesg | grep wdt
sudo apt install watchdog sudo vi /etc/watchdog.conf
décommenter les lignes
max-load-1 = 24 watchdog-device = /dev/watchdog watchdog-timeout = 15
La puce BCM2835 Watchdog timer du Raspberry n'autorise que 15 secondes de timeout
éditer la configuration watchdog.conf
# use the correct interface interface = wlan0 # timeout [sec] until reboot retry-timeout = 60 # tester le hotspot ping = 10.3.141.1 # interval [sec] of testing the connectivity interval = 15
sudo systemctl start watchdog.service
Lancer watchdog
sudo systemctl status watchdog.service
Vérifier watchdog lancer
sudo systemctl enable watchdog.service
Pas n'est pas nécessaire
wdctl(1) prints the current watchdog setting (flags), watchdog identity information and timeouts.
forkbombest un shell pour générer un blocage du système, et tester le watchdog, donc à manipuler avec précautions
Créer forkbom.sh contenant
swapoff -a :(){ :|:& };:
Le rendre exécutable et le lancer bloquera le système qui ne sera relançable que par power Off/On, s'il n'y a pas de watchdog actif pour relancer automatiquement le Raspberry.
fichier log dans
/var/log/syslog*
Si il y a eu plantage, on trouvera la ligne correspondante avec
cat /var/syslog.1 |grep watchdog|grep shut
Afficher les log watchdog
cat syslog.1 |grep watchdog