Joh*_*ohn 107 centos systemd daemon
我有一项服务突然停止。我试图重新启动该服务但失败并要求运行“systemctl daemon-reload”。
它究竟是做什么的?什么是“守护进程重新加载”?
ILM*_*o_7 90
man systemctl 说:
daemon-reload
Reload systemd manager configuration. This will rerun all generators (see systemd.generator(7)), reload
all unit files, and recreate the entire dependency tree. While the daemon is being reloaded, all sockets
systemd listens on behalf of user configuration will stay accessible.
This command should not be confused with the reload command.
Run Code Online (Sandbox Code Playgroud)
所以,它本质上是一个“软”重新加载;从文件系统中获取更改的配置并重新生成依赖树。
因此,systemd.generator指出:
生成器是位于 /usr/lib/systemd/user-generators/ 和上面列出的其他目录中的小型二进制文件。systemd(1) 将在启动和配置重新加载时很早地执行这些二进制文件 - 在加载单元文件之前。生成器可以动态生成单元文件或创建单元文件的符号链接以添加额外的依赖项,从而扩展或覆盖现有定义。它们的主要目的是将不是本机单元文件的配置文件动态转换为本机单元文件。
Generators are loaded from a set of paths determined during compilation, listed above. System and user
generators are loaded from directories with names ending in system-generators/ and user-generators/,
respectively. Generators found in directories listed earlier override the ones with the same name in
directories lower in the list. A symlink to /dev/null or an empty file can be used to mask a generator,
thereby preventing it from running. Please note that the order of the two directories with the highest
priority is reversed with respect to the unit load path and generators in /run overwrite those in /etc.
After installing new generators or updating the configuration, systemctl daemon-reload may be executed. This
will delete the previous configuration created by generators, re-run all generators, and cause systemd to
reload units from disk. See systemctl(1) for more information.
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
290294 次 |
| 最近记录: |