little change.

This commit is contained in:
szrlee 2014-09-10 23:28:21 +08:00
parent 79e69d1df4
commit 218bd6e342

View File

@ -2,27 +2,47 @@ translating by szrlee
Colourful ! systemd vs sysVinit Linux Cheatsheet
================================================================================
**systemd** is the new init system, starting with Fedora and now adopted in many distributions like RedHat, Suse and Centos.
**systemd** 是一种新型init「译者注每个操作系统都有一个启动程序而Linux init是Linux系统操作中不可缺少的程序之一。所谓的init进程它是一个由内核启动的用户级进程。内核自行启动已经被载入内存开始运行并已初始化所有的设备驱动程序和数据结构等之后就通过启动一个用户级程序init的方式完成引导进程。所以init始终是第一个进程其进程编号始终为1」系统最早在Fedora中使用「译者注真的吗不是Arch经过调整适应了其它许多发行版例如RedHat、Suse和CentOS。
Historically, most of us have been using traditional SysV init scripts normally residing in /etc/rc.d/init.d/.
历史上我们大部分人用过传统的SysV init 初始化脚本,它通常情况下在/etc/rc.d/init.d/文件夹下。
These scripts invoke a daemon binary which will then fork a background process.
这些脚本调用守护进程二进制代码在后台fork一个进程。
Even though shell scripts are very flexible, tasks like supervising processes and parallelized execution ordering are difficult to implement.
尽管shell脚本非常的灵活但是很难实现像superviseing监管进程和并行执行命令这样的任务。
With the introduction of systemds new-style daemons it is easier to supervise and control them at runtime and it simplifies their implementation.
通过对systemd的新式守护进程的介绍我们发现systemd可以在runtime运行时更加简单得监管和控制守护进程并且简化了监控的实现方式implementation
The **systemctl** command is a very good initiative by the systemd team.
**systemctl**命令是systemd团队一个非常好的首创。
It shows more detailed error messages and also runtime errors of services including start-up errors.
这个命令能够显示更多详细的错误信息和包括启动错误在内的服务运行时错误。
systemd have introduced a new term called **cgroups** (control groups) which is basically groups of process that can be arranged in a hierarchy.
systemd介绍了它的新术语**cgroups**控制组它基本上是可被分层次安排的进程任务组。「译者注这里简单介绍一下cgroupcontrol group称为ContainersContainers着眼于资源的分配利用configfs作配置。它有两个重要概念第一是subsystem内核可以给进程提供的服务/资源第二是container一个进程组成员共享同样的一个或多个子系统分配限制。Containers是分层次的一个container可以hold多个container。它的可取之处是创建了一个资源分配的框架其它开发者可以利用这个框架去开发自己的资源分配patch比如上回提到的磁盘设备。」
With the original init system, determining which process does what and who it belongs to becomes increasingly difficult.
如果仅仅通过原来的初始化系统,决定哪个进程是做什么的、属于哪个用户的变得越来越困难。
With systemd, when processes spawn other processes these children are automatically made members of the parents cgroup thus avoiding confusions about inheritance.
但是通过systemd当一个进程派生其它进程是这些子进程会被自动变成父进程控制组的成员这样一来就可以避免继承的混乱。
![](http://images.linoxide.com/systemd-vs-sysVinit-cheatsheet.jpg)
There are a lot of new [systemd commands available on rhel / centos 7.0][1]注:此文原文已做,文件名是:20140901 Awesome systemd Commands to Manage Linux System.md如果翻译发布了可修改此链接 version that would replace sysvinit commands. You can also download [pdf version of the systemd vs sysvinit cheatsheet][2].