Movatterモバイル変換
[0]ホーム
Software
skarnet.org
s6
What is it ?
s6 is a small suite of programs for UNIX, designed to allow process supervision(a.k.a service supervision),in the line ofdaemontoolsandrunit, as well as variousoperations on processes and daemons. It is meant to be a toolbox forlow-level process and service administration, providing different sets ofindependent tools that can be used within or without the framework, andthat can be assembled together to achieve powerful functionality witha very small amount of code.
Examples of things you can do by assembling together several programsprovided by s6 - besides process supervision:
- syslogd functionality,using much less resources than the traditional syslogd.
- Reliable service readiness notification, which is the basis forservice dependency management.
- Controlled privileged gain as withsudo, without usingany suid programs.
- The useful parts ofsocketactivation[1]without having to change application code or link serversagainst any specific library, and without having to switch to anyspecific init system.
The s6 documentation tries to be complete and self-contained; however,if you have never heard of process supervision before, you might beconfused at first. See therelated resources sectionbelow for pointers to more resources, and earlier approaches to processsupervision that might help you understand the basics.
Installation
Requirements
- A POSIX-compliant system with a standard C development environment
- GNU make, version 3.81 or later
- skalibs version2.14.4.0 or later. It's a build-time requirement. It's also a run-timerequirement if you link against the shared version of the skalibslibrary.
- (Optional, but really recommended for full functionality):execline version2.9.7.0 or later. When s6 is built with execline support (which is the default),execline is a build-time requirement, and also a run-time requirement forcertain binaries that spawn scripts interpreted withexeclineb.
The following optional dependencies are also supported:
- If you're usingmusl andwant nsswitch-like functionality:nsss version0.2.1.0 or later (build-time and boot-time)
Licensing
s6 is free software. It is available under theISC license.
Download
Compilation
- See the enclosed INSTALL file for installation details.
Upgrade notes
- This page lists the differences to be aware of betweenthe previous versions of s6 and the current one.
Reference
If you prefer to read this documentation as man pages, it is now possible!There is aproject thatports the s6 documentation to a set of man pages.
Commands
All these commands exit 111 if they encounter a temporary error, and100 if they encounter a permanent error - such as a misuse. They exit127 if they're trying to execute into a program and cannot find it, and126 if they fail to execute into a program for another reason.Short-lived commands exit 0 on success.
Supervision system
s6-svscan ands6-superviseare the long-lived processes maintaining the supervision tree. Other programs area user interface to control those processes and monitor service states.
Daemontools-like utilities
These programs are a rewrite of the corresponding utilities fromdaemontools, witha few extras.
Fifodir management, notification and subscription
These programs are a clean rewrite of the obsolete "pipe-tools" package; theyare now based on a properly designed notification library.They provide a command-line interface tointer-process notification andsynchronization.
Local service management and access control
suidless privilege gain
Logging
Management of user supervision trees
Management of dynamic instances
fd-holding, a.k.a. the sensible part of socket activation
Libraries
Definitions
Related resources
s6 manual pages
Other components for s6-based init systems
- s6-linux-initis a package to help you create a/sbin/init binary booting aLinux system with s6-svscan as process 1.
- s6-overlayis a project that automates integration of s6 into Docker images.
- s6-rc is adependency-based service manager for s6.
- anopa is another dependency-basedservice manager for s6.
- 66 is anotherservice manager working on top of s6.
s6 discussion
- s6 is discussed on thesupervision mailing-list.
- There is a#s6 IRC channel on OFTC. Sometimes people are thereand answer questions.
Similar work
- daemontools, the pioneeringprocess supervision software suite.
- daemontools-encore,a derived work from daemontools with enhancements. (Note that although s6 followsthe same naming scheme, the same general design, and many of the same architecturechoices as daemontools, it is still original work, sharing no code at all withdaemontools.)
- runit, a slightly differentapproach to process supervision, with the same goals.
- perp, yet another slightly differentapproach to process supervision, also with the same goals.
- noshis another suite of system-level utilities with similarities in the designand approach. It is written in C++, though, and is coded in quite adifferent way than the previous items on this list.
Other init systems
(This list hasn't been updated in a long while. I'm keeping it for reference.)
- Felix von Leitner'sminit is aninit system for Linux, with process supervision capabilities.
- suckless init isconsidered by many as the smallest possible init. I disagree: sucklessinit is incorrect, because ithas no supervision capabilities, and thus, killing all processes but initcan brick the machine. Nevertheless, suckless init, like many othersuckless projects, is a neat exercise in minimalism.
- sysvinit is thetraditional init system for Linux.
- Upstart is a well-known init systemfor Linux, with complete service management, that came with earlier versions of the Ubuntudistribution. It is now deprecated.
- systemd is a problem in its own category.
- The various BSD flavors have their own style ofinit.
- MacOS X has its own init spaghetti monster calledlaunchd.
All-in-one init systems generally feel complex and convoluted, and when mostpeople find out about the process supervision approach to init systems, theyusually find it much simpler.There is a good reason for this.
Miscellaneous
Why "s6" ?
skarnet.org'ssmall andsecuresupervisionsoftwaresuite.
Also, s6 is a nice command name prefix to have: it identifies the origin of thesoftware, and it's short. Expect more use of s6- in future skarnet.org softwarereleases. And please avoid using that prefix for your own projects.
Footnotes
[1] Take everything you read on that link with two or three salt shakers.(This is true for anything written by the author of that document.)
[8]ページ先頭