CentOS7中使用systemctl列出启动失败的服务
导读 本教程介绍如何使用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