Runit

runitOriginal author(s)| Gerrit Pape

|

Initial release| February 10, 2004; 22 years ago (2004-02-10)[1]
Stable release|

2.2.0 / September 29, 2024; 19 months ago (2024-09-29)[2]

Written in| C, Shell
Operating system| Linux, FreeBSD, OpenBSD, NetBSD, macOS, Solaris
Type| Init daemon
License| New BSD License

runit is an init and service management scheme for Unix-like Operating systems that initializes, supervises, and ends processes throughout the operating system. Runit is a reimplementation of the daemontools[3] process supervision toolkit that runs on many Linux-based operating systems, as well as BSD, and Solaris operating systems. Runit features parallelization of the start up of system services, which can speed up the boot time of the operating system.[4]

When running as an init daemon, Runit is the direct or indirect ancestor of all other processes. It is the first process started during booting, and continues running until the system is shut down. It is often used with other init systems as a separate service manager. In the service manager role, it can be used by unprivileged users to orchestrate personal services, as well as by root to manage services not otherwise managed by the init system currently in use.

Runit booting Void Linux

## Contents

* 1 Design
* 2 Usage
* 2.1 Adoption
* 3 References
* 4 External links

## Design

Runit focuses on being a small, modular, and portable codebase. In the init role, Runit is split into three stages: one time initialization, process supervision, and halting or rebooting. While the first and third stages must be adapted to the specific operating system they are running on, the second stage is portable across all POSIX compliant operating systems.[4] The 3 stages can be configured through 3 executable files (they are usually shell scripts) named, respectively, 1, 2, and 3.

Stage 2 usually invokes a binary named runsvdir, which is the process responsible for global daemon management: for every daemon it finds in a folder passed to it by argument, it then spawns an individual watchdog, each of those starts a daemon (and a logger service eventually associated to it) and restarts it if it dies. In case a daemon is added or removed, it kills the watchdog or starts a new one. Executable files with specific names are used to describe the various phases of the daemon's life (run, check, finish, ...), it can intercept signals sent and run by specific scripts if they exist, and named pipes are created to expose interfaces to control the daemon.

## Usage

Runit can be used either as a drop-in replacement[5] for sysvinit, or as a service supervisor (with sysvinit as the parent PID 1 process which runs processes specified by the inittab file, or some other init system).[6] The RubyWorks stack of software able to run Ruby on Rails incorporated Runit into its suite.[7]

### Adoption

Runit is the default init system of:

* antiX (Debian based, since version 19)
* Dragora GNU/Linux-Libre (since Dragora 2)
* Void Linux[8]

Runit is an "officially" available init system for:

* Artix Linux (Arch based)
* Devuan (Debian based, since version 3.1.0)
* Gentoo Linux[9]
* Hyperbola GNU/Linux-libre (Arch and Debian based)

## References

1. ↑ Pape, Gerrit (2004-02-10). "runit-1.0.0 release". gmane.comp.sysutils.supervision.general (Mailing list). Archived from the original on 2013-12-13. Retrieved 2013-12-10.
2. ↑ Pape, Gerrit (2024-09-29). "runit-2.2.0 available". https://www.mail-archive.com/supervision@list.skarnet.org/msg03158.html.
3. ↑ Purcell, Steve (2007-11-11). "Init Scripts Considered Harmful". http://www.sanityinc.com/articles/init-scripts-considered-harmful/.
4. ↑ 4.0 4.1 Pape, Gerrit. "runit - benefits". http://smarden.org/runit/benefits.html.
5. ↑ Pape, Gerrit. "replacing init". http://smarden.org/runit/replaceinit.html.
6. ↑ Pape, Gerrit. "use with traditional init". http://smarden.org/runit/useinit.html.
7. ↑ "Process management with runit". http://rubyworks.rubyforge.org/manual/runit.html.
8. ↑ "VoidLinux". https://docs.voidlinux.org/config/services/.
9. ↑ "Gentoo". https://wiki.gentoo.org/wiki/Runit.

## External links

* runit
* on GitHub

* v
* t
* e

Service management in Unix-like systems

Portable implementations|

* init
* Initng
* runit
* OpenRC

Operating-system-specific|

* Linux
* systemd
* Upstart
* macOS
* launchd
* SystemStarter
* Solaris
* Service Management Facility

Process supervision tools|

* daemontools
* monit
* runit

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Runit. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Software:Runit&oldid=4143176"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template