当我运行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
....
怎么回事,我该怎么解决?
发布于 2018-06-03 02:48:17
这意味着您的一些服务无法启动。如果在不使用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.
通常,您需要阅读日记/日志,以便通过使用journalctl -xe
了解下一步该如何处理该失败项。如果您只想重置单元,以便系统“显示”使用绿色点的running
,则可以运行:
systemctl reset-failed
发布于 2019-04-18 18:17:12
你也可以尝试:
sudo systemctl reset-failed
系统重置失败正在清除失败的单元。您可以使用systemctl重置失败命令手动清除失败的单元.这可以为所有单位,或一个单一的单位。不再需要的服务最好被停止和禁用。
reset-failed [PATTERN...]
Reset the "failed" state of the specified units, or if no unit name is passed, reset the state of all units. When a unit
fails in some way (i.e. process exiting with non-zero error code, terminating abnormally or timing out), it will
automatically enter the "failed" state and its exit code and status is recorded for introspection by the administrator
until the service is stopped/re-started or reset with this command.
In addition to resetting the "failed" state of a unit it also resets various other per-unit properties: the start rate
limit counter of all unit types is reset to zero, as is the restart counter of service units. Thus, if a unit's start
limit (as configured with StartLimitIntervalSec=/StartLimitBurst=) is hit and the unit refuses to be started again, use
this command to make it startable again.
发布于 2020-02-12 04:35:40
$ systemctl --失败
单元负载主动子描述
ipmievd.service加载失败Ipmievd守护进程失败
kdump.service加载失败崩溃恢复内核武装失败
LOAD =反映单元定义是否正确加载。
ACTIVE =高级单元激活状态,即子的泛化。
SUB =低级单元激活状态,值取决于单元类型.
2个装载单位列出。通过
要显示所有已安装的单元文件,请使用“systemctl列表-单元-文件”。
https://unix.stackexchange.com/questions/447561
复制相似问题