An RPi2 with LE7 and TVH is always on. It records DVB-T to an external disk. Prior to recording, it mounts disk, and affter a recording, disk is unmounted since RPi will surelly hang if external disk goes to sleep while mounted. That seems to work perfectly well for years.
Form time to time, once in 3-4 months, RPi will hang up and I can not find why. I can ping it. I can not SSH to it but it will actively refuse telent to it. My router will show RPi as active and alive. It is a remote machine co I can not test if Kodi is working over HDMI. I do not know if it works partialy or not at all, but seems to me it is not absolutely hang up / dead. The rest of that network works perfeclty.
The script running at that RPi every 12 minutes (which controls it) will apparantly stop working. I can see that this script does not connect (ssh) to my router any more nor make any log entries to the local memory card. I can not connect to TVH and TVH will not make any recordings from that point on. My only way out is to power cycle the RPi - after that all is well again.
I have just made the RPi cron entry to test if it can sucesfully ssh to the router and if not, reboot the RPi. But, will that cron run when the problem arises?
So, is there something internal which I can use to test and reboot RPi if it looses the connection (can not ssh) to a router?
Is there a better solution?