Tiny Core Extensions > TCE Corepure64
How to enable watchdog?
FlyingDutchman:
Hi Rich,
Thanks for your response and the pointers towards wdctl and watchdogd. I'm running a small home server based on TCL; main tasks are to act as NAS and router. I have a health check script scheduled in cron to perform some basic checks every 5 minutes and take action if needed. Mostly this works well, but in some rare occasions this script does more damage than good. That results in a system with too many processes running, probably short on memory and high CPU load. At those times, I can't even log in and a hard reboot is the only solution.
I stumbled upon the watchdog mechanism in Linux, never heard of it before last week and am now investigating if this is a solution. Mostly for education, a bit to solve the minor issue above.
Rich:
Hi FlyingDutchman
--- Quote from: FlyingDutchman on January 29, 2022, 04:34:59 AM --- ... I have a health check script scheduled in cron to perform some basic checks every 5 minutes and take action if needed. Mostly this works well, but in some rare occasions this script does more damage than good. That results in a system with too many processes running, probably short on memory and high CPU load. ...
--- End quote ---
I would seriously try to find out why your script causes this behavior before considering a watchdog timer.
A few things come to mind:
Sometimes your script doesn't exit. Over time multiple copies are left running, possibly fighting each other.
Sometimes your script takes more than 5 minutes to run. A second copy gets started and clashes with the first copy.
A loop in your script reads a system file (/proc, /sys, ... ) waiting for something to happen. Without a sleep command
to slow down that loop, CPU usage will quickly rise to 100%.
Launching a command in the background that doesn't always complete. Over time multiple copies are left running.
Navigation
[0] Message Index
[*] Previous page
Go to full version