How to use Linux software watchdog?
Most of the Unix/Linux init
programs will manage daemons for you and restart them. Look into placing your service in /etc/inittab
. Or you might be using Upstart
or systemd
.
All of these programs run as PID 1
and it is their job to monitor and restart system processes.
From your Busybox tag I would assume you are running an embedded system. On those, the System V style init scripts with all of their shell scripts are really overkill. You should probably rip all that out and replace it with entries in /etc/inittab
or upstart or systemd jobs.
Software watchdog causing system reboot if started at bootup
Debugged and found the problem to be time(NULL) returning a huge number in src/file_stat.c
This was happening due to date being not set very early during bootup.
Related Topics
Tcp: Server Sends [Rst, Ack] Immediately After Receiving [Syn] from Client
Where to Get Msbuild for Linux
Rename File Command in Unix with Timestamp
Sort by Third Column Leaving First and Second Column Intact in Linux
Extract Average Time from Ping -C
Linux/Ubuntu Set: Illegal Option -O Pipefail
Find and Replace Text in a File Between Range of Lines Using Sed
Linker Error on Linux: "Undefined Reference To"
Decrypt Obfuscated Perl Script
Curl Simple File Upload - 417 Expectation Failed
How to Install Xvfb (X Virtual Framebuffer) on Redhat 6.5
Automated Test Tools for Linux/Ncurses
How to Change the Size of a Named Pipe on Linux
How to Respond to Prompts in a Linux Bash Script Automatically