If you wished to set up a liveness test, the following could be useful checks. You have to start by testing remote access because a local monitor can't be guaranteed to survive; but beware of some unrelated LAN issue preventing the connection.
- Can you connect to the telnet server? Note: if you use some other protocol (HTTP, MQTT, ...) the server won't be running from the flash disk and may behave strangely if the
/mod
filesystem is in trouble.
- Can you find the RW mount point for the
/mod
filesystem: mount | grep -E "on /$(ls -l /mod | sed -ne 's@^l.* -> @@;s@/mod$@@;p') type ext[234] \(rw,"
?
- Can you find the PID of a running humaxtv process
PID="$(ls -l /proc/*/exe 2>&- | grep "/usr/bin/humaxtv" | cut -d'/' -f 3)"
?
- Now you can either analyse the output of
lsof -p $PID
(or similar) directly or just call status
to check the health of the humaxtv process.
status
will also show if the HD/R is recording or about to record in case you want to force a reboot.
If #1 fails you need to use the power switch (manual or networked), or the reset button on HD. if any of the later tests fails, or your analysis determines that it's a safe time to restart, you can try a software-invoked reboot, which would be better for
@mike_m's disk heads, failing back to the power switch.