| 本教程介绍如何使用systemctl工具列出启动失败的systemd管理的各个服务 |
列出启动失败的服务
[root@localhost ~]# systemctl list-units --state failed UNIT LOAD ACTIVE SUB DESCRIPTION ● httpd.service loaded failed failed The Apache HTTP Server LOAD = Reflects whether the unit definition was properly loaded. ACTIVE = The high-level unit activation state, i.e. generalization of SUB. SUB = The low-level unit activation state, values depend on unit type. 1 loaded units listed. Pass --all to see loaded but inactive units, too. To show all installed unit files use 'systemctl list-unit-files'.

可以发现,有个一个服务启动失败了。
is-failed选项
可以使用is-failed选项检查指定的服务是否启动失败。如果启动失败,结果是fai
使用systemctl在CentOS7中排查启动失败服务

本文介绍了如何在CentOS7中使用systemctl命令检查启动失败的服务。通过is-failed选项确定服务状态,结合status查看失败原因,并利用journalctl深入分析日志,解决由于配置文件错误导致的服务启动失败问题。
最低0.47元/天 解锁文章
1422

被折叠的 条评论
为什么被折叠?



