Checking Raspberry Pi Stability
Very recently, I've started working on a hobby project on the Raspberry Pi. One of the first things I've noticed though is that the Pi isn't very stable (especially if it has a Wolfson Audio Card attached to it). Frequently (as in somewhere every 24 hours or so) the entire system bricks with a Kernel panic. Now, that isn't a great position to be in if you're looking to the Pi for some stability for embedded applications. To figure out how frequently the Pi fails on me, I've resorted to a simple script that I run every minute in a crontab:
Script check_health.sh:
#!/bin/bash
echo `date +%F-%H:%M:%S` Server up
Crontab (runs the script every minute):
$ crontab -e
* * * * * /home/pi/healthz/check_health.sh >> /home/pi/healthz/healthz.log
This simple mechanism is a quick way to figure out when your Pi crashes and how long it typically stays up. Simple and elegant. Maybe this will be useful to you too in some other project that you're working on.
Cheers! Until next time...
Script check_health.sh:
#!/bin/bash
echo `date +%F-%H:%M:%S` Server up
Crontab (runs the script every minute):
$ crontab -e
* * * * * /home/pi/healthz/check_health.sh >> /home/pi/healthz/healthz.log
This simple mechanism is a quick way to figure out when your Pi crashes and how long it typically stays up. Simple and elegant. Maybe this will be useful to you too in some other project that you're working on.
Cheers! Until next time...
Comments
Post a Comment