Skip to content

Instantly share code, notes, and snippets.

@sarfata
Created September 16, 2020 19:49
Show Gist options
  • Save sarfata/72c144a9b5075316e7f4a708abe0bf5c to your computer and use it in GitHub Desktop.
Save sarfata/72c144a9b5075316e7f4a708abe0bf5c to your computer and use it in GitHub Desktop.
Script to run from crontab to debug CPU lockup issues on a Raspberry Pi
#!/bin/sh │
LOG=/home/pi/iamalive.log │
date >> $LOG │
uptime >> $LOG │
ping -c 1 192.168.1.1 |grep 'transmitted\|rtt' >> $LOG │
echo >> $LOG
@sarfata
Copy link
Author

sarfata commented Sep 16, 2020

Crontab:

# m h  dom mon dow   command                                                                │
* * * * * /home/pi/iamalive.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment