HOME

TheInfoList



OR:

runit is an init and service management scheme for
Unix-like A Unix-like (sometimes referred to as UN*X, *nix or *NIX) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Uni ...
Operating systems An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
that initializes, supervises, and ends processes throughout the operating system. Runit is a reimplementation of the daemontools process supervision toolkit that runs on many
Linux Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
-based operating systems, as well as
BSD The Berkeley Software Distribution (BSD), also known as Berkeley Unix or BSD Unix, is a discontinued Unix operating system developed and distributed by the Computer Systems Research Group (CSRG) at the University of California, Berkeley, beginni ...
, 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 operating system. Init is a daemon process that continues running until the system is shut down. It is the direc ...
daemon A demon is a malevolent supernatural being, evil spirit or fiend in religion, occultism, literature, fiction, mythology and folklore. Demon, daemon or dæmon may also refer to: Entertainment Fictional entities * Daemon (G.I. Joe), a character ...
, 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 ...
of all other processes. It is the first
process A process is a series or set of activities that interact to produce a result; it may occur once-only or be recurrent or periodic. Things called a process include: Business and management * Business process, activities that produce a specific s ...
started during
booting In computing, booting is the process of starting a computer as initiated via Computer hardware, hardware such as a physical button on the computer or by a software command. After it is switched on, a computer's central processing unit (CPU) h ...
, 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 In vascular plants, the roots are the plant organ, organs of a plant that are modified to provide anchorage for the plant and take in water and nutrients into the plant body, which allows plants to grow taller and faster. They are most often bel ...
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 a ...
codebase In software development, a codebase (or code base) is a collection of source code used to build a particular software system, application, or software component. Typically, a codebase includes only human-written source code system files; thu ...
. 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 application programming interfaces (APIs), along with comm ...
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 Watchdog or watch dog may refer to: Animals *Guard dog, a dog that barks to alert its owners of an intruder's presence * Portuguese Watchdog, Cão de Castro Laboreiro, a dog breed * Moscow Watchdog, a breed of dog that was bred in the Soviet U ...
, 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 In computer science, executable code, an executable file, or an executable program, sometimes simply referred to as an executable or binary, causes a computer "to perform indicated tasks according to encoded instruction (computer science), in ...
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 Interface or interfacing may refer to: Academic journals * ''Interface'' (journal), by the Electrochemical Society * '' Interface, Journal of Applied Linguistics'', now merged with ''ITL International Journal of Applied Linguistics'' * '' Inter ...
to control the daemon.


Usage

Runit can be used either as a drop-in replacement 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). The RubyWorks stack of software able to run Ruby on Rails incorporated Runit into its suite.


Adoption

Runit is the default init system of: * antiX (
Debian Debian () is a free and open-source software, free and open source Linux distribution, developed by the Debian Project, which was established by Ian Murdock in August 1993. Debian is one of the oldest operating systems based on the Linux kerne ...
based, since version 19) * Dragora GNU/Linux-Libre (since Dragora 2) * Void Linux Runit is an "officially" available init system for: * Artix Linux (
Arch An arch is a curved vertical structure spanning an open space underneath it. Arches may support the load above them, or they may perform a purely decorative role. As a decorative element, the arch dates back to the 4th millennium BC, but stru ...
based) *
Devuan Devuan is an open source, Debian-based Linux distribution that aims to maintain compatibility with other init systems and avoid lock-in by systemd. Devuan offers sysvinit, runit or OpenRC as alternatives to systemd. History With the relea ...
(
Debian Debian () is a free and open-source software, free and open source Linux distribution, developed by the Debian Project, which was established by Ian Murdock in August 1993. Debian is one of the oldest operating systems based on the Linux kerne ...
based, since version 3.1.0) *
Gentoo Linux Gentoo Linux (pronounced ) is a Linux distribution built using the Portage package management system. Unlike a binary software distribution, the source code is compiled locally according to the user's preferences and is often optimized for ...
* Hyperbola GNU/Linux-libre (
Arch An arch is a curved vertical structure spanning an open space underneath it. Arches may support the load above them, or they may perform a purely decorative role. As a decorative element, the arch dates back to the 4th millennium BC, but stru ...
and
Debian Debian () is a free and open-source software, free and open source Linux distribution, developed by the Debian Project, which was established by Ian Murdock in August 1993. Debian is one of the oldest operating systems based on the Linux kerne ...
based) * Void Linux


References


External links


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