Runit
   HOME

TheInfoList



OR:

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 daemontools is a process supervision toolkit written by Daniel J. Bernstein as an alternative to other system initialization and process supervision tools, such as Init. Some of the features of daemontools are: * Easy service installation and ...
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. When running as an
init In Unix-based computer operating systems, init (short for ''initialization'') is the first process started during booting of the computer system. Init is a daemon process that continues running until the system is shut down. It is the direc ...
daemon, Runit is the direct or indirect
ancestor An ancestor, also known as a forefather, fore-elder or a forebear, is a parent or ( recursively) the parent of an antecedent (i.e., a grandparent, great-grandparent, great-great-grandparent and so forth). ''Ancestor'' is "any person from w ...
of all other processes. It is the first process started during
booting In computing, booting is the process of starting a computer as initiated via Computer hardware, hardware such as a button or by a software command. After it is switched on, a computer's central processing unit (CPU) has no software in its ma ...
, 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.


Design

Runit focuses on being a small, modular, and
portable Portable may refer to: General * Portable building, a manufactured structure that is built off site and moved in upon completion of site and utility work * Portable classroom, a temporary building installed on the grounds of a school to provide ...
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 The Portable Operating System Interface (POSIX) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines both the system- and user-level application programming in ...
compliant operating systems. 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 intercepts signals sent and run specific scripts if they exists, and named pipes are created to expose interfaces to control the daemon.


Usage

Runit can be used either as a drop-in replacement for
sysvinit In Unix-based computer operating systems, init (short for ''initialization'') is the first process started during booting of the computer system. Init is a daemon process that continues running until the system is shut down. It is the direct ...
, 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). The RubyWorks stack of software able to run
Ruby on Rails Ruby on Rails (simplified as Rails) is a server-side web application framework written in Ruby under the MIT License. Rails is a model–view–controller (MVC) framework, providing default structures for a database, a web service, and we ...
incorporated Runit into its suite.


Adoption

Runit is the default init system of: *
antiX antiX () is a Linux distribution based on Debian Stable. It is comparatively lightweight and suitable for older computers, while also providing cutting edge kernel and applications, as well as updates and additions via the apt-get package sys ...
(
Debian Debian (), also known as Debian GNU/Linux, is a Linux distribution composed of free and open-source software, developed by the community-supported Debian Project, which was established by Ian Murdock on August 16, 1993. The first version of De ...
based, since version 19) *
Dragora GNU/Linux-Libre Dragora GNU/Linux-Libre is an Argentine Linux distribution written from scratch sharing some similarities with Slackware. It has a simple packaging system that allows installing, removing, upgrading and creating packages, although the system may ...
(since Dragora 2) * Venom Linux *
Void Linux Void Linux is an independent Linux distribution that uses the X Binary Package System (XBPS) package manager, which was designed and implemented from scratch, and the runit init system. Excluding binary kernel blobs, a base install is composed e ...
Runit is an "officially" available init system for: *
Artix Linux Artix Linux (or simply Artix ) is a rolling-release distribution based on Arch Linux that uses inits such as OpenRC, runit, s6, or Dinit, as opposed to Arch Linux's init systemd. Artix Linux has its own package repositories but, as a pacman ...
(
Arch An arch is a vertical curved structure that spans an elevated space and may or may not support the weight above it, or in case of a horizontal arch like an arch dam, the hydrostatic pressure against it. Arches may be synonymous with vau ...
based) *
Devuan Devuan is a fork of the Debian Linux distribution that uses sysvinit, runit or OpenRC instead of systemd. Devuan aims to avoid "lock-in" by projects like systemd and aims to maintain compatibility with other init systems to avoid detaching ...
(
Debian Debian (), also known as Debian GNU/Linux, is a Linux distribution composed of free and open-source software, developed by the community-supported Debian Project, which was established by Ian Murdock on August 16, 1993. The first version of De ...
based, since version 3.1.0)


References


External links


runit
* Software using the BSD license Unix process- and task-management-related software {{Unix-stub