User Tools

Site Tools


services:system_and_service_managers

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
services:system_and_service_managers [2016/07/06 13:38] peterservices:system_and_service_managers [2020/07/26 13:10] (current) – old revision restored (2016/07/06 14:52) 173.249.63.71
Line 1: Line 1:
 ====== Services - System and service managers ====== ====== Services - System and service managers ======
 +
 +Linux provides many System and service managers.
 +
 +A good init system should start only what is needed, and that on-demand. Either lazily or in parallel and in advance.  However it should not start more than necessary, particularly not everything installed that could use that service.
  
 ===== init ===== ===== init =====
  
 System V style init script **/etc/init.d/name**. System V style init script **/etc/init.d/name**.
 +
 +**Disadvantages of init**
 +
 +  * The traditional System V init system had limitations.  For example, some services need to start after other services (for example, you can't mount NFS filesystems until the network is running), but the only way in System V to handle that is to set the links in the rc#.d directory such that one is before the other.  You might need to re-number everything later when dependencies are added or changed.
 +  * Could not start services in parallel.
  
  
Line 16: Line 25:
 According to the man page, all access to init scripts by Debian packages' maintainer scripts should be done through invoke-rc.d. According to the man page, all access to init scripts by Debian packages' maintainer scripts should be done through invoke-rc.d.
  
-  * [https://people.debian.org/~hmh/invokerc.d-policyrc.d-specification.txt] +  * https://people.debian.org/~hmh/invokerc.d-policyrc.d-specification.txt 
-  * [http://manpages.ubuntu.com/manpages/xenial/man8/invoke-rc.d.8.html]+  * http://manpages.ubuntu.com/manpages/xenial/man8/invoke-rc.d.8.html
  
  
 ===== service ===== ===== service =====
  
-**service** runs a System V init script in as predictable environment as possible, removing most environment variables and with current working directory set to /.+**service** runs a System V init script in as predictable an environment as possible, removing most environment variables and with current working directory set to /.
  
 **service** works in most Linux distributions including Debian and Ubuntu. **service** works in most Linux distributions including Debian and Ubuntu.
Line 33: Line 42:
 **systemctl** only works on **systemd** based Ubuntu like version 16.04 LTS and above. **systemctl** only works on **systemd** based Ubuntu like version 16.04 LTS and above.
  
-systemd jobs start when they have to.  
  
 +**Advantages of systemd**
  
-  * [http://en.wikipedia.org/wiki/Systemd] +  * Every process started gets its own cgroup or a particular cgroup.  This makes it more efficient to identify malicious users/processes. 
-  * [https://wiki.ubuntu.com/SystemdForUpstartUsers]+  * Pre-creation of sockets and file handles for services, similar to how xinetd does for it's services, allowing dependent services to start faster.  For example, systemd will hold open the filehandle for /dev/log for syslog, and subsequent services that send to /dev/log will have their messages buffered until syslogd is ready to take over. 
 +  * Fewer processes run to actually start a service.  This means you aren't writing a shell script to start up your service.  This can be a speed improvement, and (IMO) something easier to set up in the first place. 
 +  * systemd jobs start when they have to.  
 + 
 + 
 +**Disadvantages of systemd** 
 + 
 +  * All startup scripts need to be rewritten.  
 +  * There's way less compatibility with non-linux OSs (like BSDs, for example). 
 + 
 + 
 +**References** 
 + 
 +  * http://en.wikipedia.org/wiki/Systemd 
 +  * https://wiki.ubuntu.com/SystemdForUpstartUsers
  
  
Line 49: Line 72:
  
 Upstart jobs start as soon as they can. Upstart jobs start as soon as they can.
- 
  
  
services/system_and_service_managers.1467812317.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki