Restructure and add section on Watchdog process supervision

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2015-01-06 21:45:14 +01:00
1 parent 076f77a31b
commit d40f52357e
1 file changed
+48 -29
+48 -29
View File
@@ -1,5 +1,5 @@
TODO Goals of Finit
==== ==============
The intent of finit is to monitor not just processes, but to supervise The intent of finit is to monitor not just processes, but to supervise
an entire system and the behavior of certain processes that declare an entire system and the behavior of certain processes that declare
@@ -14,6 +14,9 @@ finit is to be a replacement for:
A small and simple replacement, primarily for embedded systems, with a A small and simple replacement, primarily for embedded systems, with a
very low dependency on external packages. very low dependency on external packages.
General
-------
* Integrate libev, or libuEv, to handle events: signals, I/O, etc. * Integrate libev, or libuEv, to handle events: signals, I/O, etc.
"Event driven software improves concurrency" -- Dave Zarzycki, Apple "Event driven software improves concurrency" -- Dave Zarzycki, Apple
@@ -22,10 +25,27 @@ very low dependency on external packages.
for more info! for more info!
See uftpd for how libuEv can be easily integrated as a submodule. See uftpd for how libuEv can be easily integrated as a submodule.
* Add support for a `/dev/watchdog` plugin to replace `watchdogd` * Add support for `init <q | reload-configuration>` and `SIGHUP` to
* Integrate watchdog plugin with process/system supervisor to optionally have finit reload its `finit.conf`, but also
reboot the system when a process stops responding, or when a respawn * Add support for inotify to automatically reload `finit.conf`
limit has been reached, as well as when system load gets too high. * Implement `initctl stop|start|restart|reload|status <SVC>` and
`service <SVC> stop|start|restart|reload|status` on top
* Add PRE and POST hooks for when switching between runlevels
* Add support for `init -v,--version | version`
* Cleanup move sources from top-level directory to `src/` and `include/`
* Make sure to install `queue.h` to `$(PREFIX)/include/finit/queue.h`
* Move `finit.conf` "check" command to plugin which checks `/etc/fstab`
instead. This is the de-facto practice. But keep the check command
for really low-end systems w/o `/etc/fstab`.
Init
----
Finit in itself is not SysV Init compatible, it doesn't use `/etc/rc.d`
and `/etc/inet.d` scripts to boot the system. However, a plausible way
to achieve compatibility would be to add a plugin to finit which reads
`/etc/inittab` and starts standard Linux systems.
Inetd Inetd
@@ -70,14 +90,18 @@ an SSH service on different ports on different interfaces:
tcp 222 { tcp 222 {
listen = wan0 listen = wan0
exec = dropbear -i exec = dropbear -i
wait = yes
} }
# Run TFTP service on all interfaces except upstream interface # Run TFTP service on all interfaces except upstream interface
udp tftp { udp tftp {
listen = *, !wan0 listen = *, !wan0
exec = uftpd -i -t exec = uftpd -i -t
user = root
} }
Syntax very similar to [xinetd](http://en.wikipedia.org/wiki/Xinetd)
Crond Crond
----- -----
@@ -110,31 +134,26 @@ the shell -- that way setting up one-time jobs would not entail
re-reading `/etc/finit.conf` re-reading `/etc/finit.conf`
Configuration Watchdog
------------- --------
* Add support for `init <q | reload-configuration>` and `SIGHUP` to Support for monitoring the health of the system and its processes.
have finit reload its `finit.conf`, but also
* Add support for inotify to automatically reload `finit.conf`
* Add support for a `/dev/watchdog` plugin to replace `watchdogd`
Runlevels * Integrate system supervisor to optionally reboot the system when a
--------- process stops responding, or when a respawn limit has been reached,
as well as when system load gets too high.
* Implement `initctl stop|start|restart|reload|status <SVC>` and * API for processes to register with the watchdog.
`service <SVC> stop|start|restart|reload|status` on top - Deeper monitoring of a process main loop
* Add PRE and POST hooks for when switching between runlevels - If a process is not heard from within its subscribed period time
reboot system or restart process.
* Separate `/etc/watchdog.conf` configuration file, or a perhaps
Miscellaneous support for `/etc/finit.d/PLUGIN.conf`?
------------- * Support enable/disable watchdog features:
- Supervise processes,
* Add support for `init -v,--version | version` - CPU loadavg,
* Cleanup move sources from top-level directory to `src/` and `include/` - Watch for file descriptor leaks,
* Make sure to install `queue.h` to `$(PREFIX)/include/finit/queue.h` - etc.
* Move `finit.conf` "check" command to plugin which checks `/etc/fstab`
instead. This is the de-facto practice. But keep the check command
for really low-end systems w/o `/etc/fstab`.
Documentation Documentation