You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-6Lines changed: 10 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -9,24 +9,25 @@ _It will start, monitor and restart applications if they crash or stop sending h
9
9
The Process Watchdog is a Linux-based utility designed to start, monitor and manage processes specified in a configuration file. It ensures the continuous operation of these processes by periodically checking their status and restarting them if necessary.
10
10
11
11
## Overview
12
-
This application acts as a vigilant guardian for your critical processes, ensuring they remain operational at all times. It accomplishes this task by regularly monitoring the specified processes and taking appropriate actions if any anomalies are detected. The primary function of this application is to ensure that the managed processes remain active, restarting them if they crash or stop sending heartbeat signals over UDP.
12
+
This application acts as a vigilant guardian for your critical processes, ensuring they remain operational at all times. It accomplishes this task by regularly monitoring the specified processes and taking appropriate actions if any anomalies are detected. The primary function of this application is to ensure that the managed processes remain active, restarting them if they crash or stop sending heartbeat messages.
13
13
14
-
This application is particularly useful in environments where multiple processes need to be constantly running, such as server systemsor embedded devices. It operates based on the principle that each monitored process should periodically send its process ID (PID) over UDP. If a process fails to send its PID within the specified time interval, the watchdog manager assumes the process has crashed and automatically restarts it.
14
+
This application is particularly useful in environments where multiple processes need to be constantly running, such as server systems, clouds or embedded devices. It operates based on the principle that each monitored process should periodically send heartbeat messages. If a process fails to send a heartbeat within the specified time interval, the watchdog manager assumes the process has halted/hang and automatically restarts it.
15
15
16
16
## Features
17
17
- Starts and monitors specified processes listed in a configuration file.
18
-
- Restarts processes that have crashed or stopped sending their PID.
18
+
- Restarts processes that have crashed or stopped sending their heartbeat.
19
19
- Listens to a specified UDP port for heartbeat messages containing process IDs (PIDs).
20
20
- Provides a centralized platform for managing multiple processes, enhancing operational efficiency.
21
21
- Provides file command interface to manually start, stop, or restart individual processes or the entire watchdog system or even a Linux reboot.
22
22
- Generates statistics log files to track the status and history of each managed process.
23
23
24
24
## Requirements
25
-
- Processes managed by Process Watchdog must periodically send their PID over UDP to prevent being restarted.
25
+
- Processes managed by Process Watchdog must periodically send their heartbeat messages to prevent being restarted.
26
26
- Configuration file `config.ini` in the same directory with details about the processes to be managed and the UDP port for communication.
27
27
28
28
## Configuration File : `config.ini`
29
29
An example configuration file looks like this:
30
+
Note that ping means heartbeat.
30
31
31
32
```ini
32
33
[processWatchdog]
@@ -65,8 +66,10 @@ nWdtApps = 4
65
66
-`ping_interval` : Maximum time period in seconds between pings.
66
67
-`cmd` : Command to start the application.
67
68
68
-
## Example Heartbeat Message Code
69
-
The managed processes must send a message containing their PID with prefix `p` (Ex: `p12345`) over UDP. Below are example heartbeat message codes in various languages.
69
+
## Heartbeat Message
70
+
A heartbeat message is a UDP message containing the managed process's process IDs (PID) with the prefix p (e.g., p12345). This message is periodically sent to the specified UDP port.
71
+
72
+
Below are example heartbeat message codes in various languages:
70
73
71
74
### Java
72
75
```java
@@ -334,6 +337,7 @@ Use the provided `run.sh` script to start the Process Watchdog application. This
334
337
Or just `./run.sh &` which is recommended.
335
338
336
339
## TODO
340
+
- Replace ping with heartbeat in the code and .ini
0 commit comments