09-18-2017, 05:47 PM
(09-18-2017, 05:17 PM)XaRz Wrote: I'm trying to understand why my pine64+ keeps hanging after 3 days or so ... when it became unreacheable from the network and I suspect the board hangs. How can I debug the problem?
Any hint would be great.
One simple thing you can do is to setup a heart-beat monitor ( blinking LED ) on the system LED pins ; directly next to the IR port. Use the code below:
sysled_heartbeat.sh
Code:
#!/bin/sh
echo $1 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio$1/direction
COUNTER=0
while [ $COUNTER -lt 10 ]; do
echo 0 > /sys/class/gpio/gpio$1/value
sleep .35
echo 1 > /sys/class/gpio/gpio$1/value
sleep .65
done
echo $1 > /sys/class/gpio/unexport
You can run this code as sudo with :
sudo ./sysled_heartbeat.sh 359
This assumes you have the system LED plugged in; the ballast resistor is built-in; use a 3mm low power LED ( white is nice )
The idea is simple, if the board hangs the light will stop blinking. The blinking light requires the OS to be functional to provide the ON|OFF sleep cycles.
I suspect your board is NOT hanging ( the light will prove that ). More likely your network connection has dropped for some reason... is this a wifi connection ? If so, sometimes in idle states the wifi will shutdown to conserve power and the connection will drop. Sometimes the eth connection will do the same; one way to put a stop to this temporarily while you're getting a handle on the problem is to setup a script that wakes up once every few minutes to send three pings to your router ( use crontab ). Another thing you can do is to send part ( or all ) of your dmesg log to another machine using scp every so many minutes ( say thirty ).
If your OS is hanging something is really wrong ( probably corrupted SD card ). My PineA64+ boards ( both of them ) run 24-7-365 ... I rarely reboot them and they have both been running for several months now. I have heart-beat monitors on all my boards, and I have a function monitor on my main server.
marcushh777
please join us for a chat @ irc.pine64.xyz:6667 or ssl irc.pine64.xyz:6697
( I regret that I am not able to respond to personal messages; let's meet on irc! )
please join us for a chat @ irc.pine64.xyz:6667 or ssl irc.pine64.xyz:6697
( I regret that I am not able to respond to personal messages; let's meet on irc! )