systemctl状态显示:“状态:降级”

当运行步时systemctl status,命令输出 State: degraded

● x230
    State: degraded
     Jobs: 0 queued
   Failed: 1 units
    Since: Wed 2018-05-30 17:09:49 CDT; 3 days ago
  ....

发生了什么,该如何解决?

 

这意味着您的某些服务无法启动。如果systemctl;不带status参数运行就可以看到它们。

他们应该表现出类似的东西,

loaded failed failed

或者,您可以使用systemctl --failed来显示失败的服务

  UNIT                        LOAD   ACTIVE SUB    DESCRIPTION                
● postgresql@9.4-main.service loaded failed failed PostgreSQL Cluster 9.4-main

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.


您也可以尝试:

sudo systemctl reset-failed

systemd重置失败正在清除失败的单元。您可以使用systemctl reset-failed命令手动清除故障单元。可以对所有单元或一个单元执行此操作。不再需要的服务最好停止和禁用。

 

 

要更简洁地回答原始问题:

systemctl | grep fail

posted @ 2021-11-18 18:26  augusite  阅读(4564)  评论(0编辑  收藏  举报