OS Monitoring and Automatic Restarter
Why?
I have a server environment but it frequently shows kernel panic :(
This problem is resolved with a workaround now, but I have worries about it.
And to make matters worse, I'll travel starting tomorrow.
Deployed sample
Architecture
- Server (PC) sends
A
(0x41
) to/dev/ttyACM0
every 1s. - Watcher (Arduino UNO) check the serial port, and if can not receive a message for more than 5 sec, it triggers RESET PIN on the motherboard. (excepts wait for boot state.)
How to use it
PC daemon installation
- Install
./target/availability_report
to/usr/sbin/
. - Install
./target/availability_report.service
to/etc/systemd/system/
. - Run
systemctl daemon-reload
andsystemctl enable --now availability_report
NOTE: If your device path is not /dev/ttyACM0
, please edit the availability_report
.
Arduino installation
- Write
watcher/watcher.ino
to Arduino.
System installation
- Connect RESET PIN (+) on the motherboard to GPIO 2 on the Arduino.
- Connect Arduino to the PC. (Ground potential must be matched.)