AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / unix / 问题 / 447561
Accepted
Evan Carroll
Evan Carroll
Asked: 2018-06-03 18:48:17 +0800 CST2018-06-03 18:48:17 +0800 CST 2018-06-03 18:48:17 +0800 CST

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

  • 772

当我跑步时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
  ....

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

systemd
  • 5 5 个回答
  • 149670 Views

5 个回答

  • Voted
  1. Best Answer
    Evan Carroll
    2018-06-03T18:48:17+08:002018-06-03T18:48:17+08:00

    这意味着您的某些服务无法启动。如果您在systemctl;没有status参数的情况下运行,您可以看到它们。

    他们应该显示类似的东西,

    loaded failed failed
    

    或者你可以用 列出失败的服务systemctl --failed,在我的例子中它显示

      UNIT                        LOAD   ACTIVE SUB    DESCRIPTION                
    ● [email protected] 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
    
    • 154
  2. Brad Thompson
    2019-04-19T10:17:12+08:002019-04-19T10:17:12+08:00

    您也可以尝试:

    sudo systemctl reset-failed
    

    systemd reset failed 正在清除失败的单元。您可以使用 systemctl reset-failed 命令手动清除失败的单元。这可以对所有单位进行,也可以对单个单位进行。不再需要的服务最好停止和禁用。

    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.
    
    • 32
  3. akme
    2020-02-12T20:35:40+08:002020-02-12T20:35:40+08:00

    列出失败的单元/服务

    $ systemctl --失败

    单元加载活动子描述
    ● ipmievd.service 加载失败失败 Ipmievd 守护进程
    ● kdump.service 加载失败失败 崩溃恢复内核武装

    LOAD = 反映单元定义是否正确加载。
    ACTIVE = 高级单元激活状态,即 SUB 的泛化。
    SUB = 低级单元激活状态,值取决于单元类型。

    列出了 2 个加载单元。通过 --all 也可以查看已加载但不活动的单元。
    要显示所有已安装的单元文件,请使用“systemctl list-unit-files”。

    • 18
  4. Frank Kannemann
    2019-10-04T08:23:05+08:002019-10-04T08:23:05+08:00

    为了更简洁地回答原始问题:

    systemctl | grep fail

    • 5
  5. HDK Bouma
    2020-07-09T22:33:53+08:002020-07-09T22:33:53+08:00

    查找失败原因:

    sudo systemctl status <service>
    

    (替换<service>为失败服务的名称)。你会发现很多关于服务的信息,以及失败的原因。

    • 2

相关问题

  • journalctl 中的区分级别

  • 将默认编辑器更改为 vim for _ sudo systemctl edit [unit-file] _

  • systemd:如何在服务启动时运行脚本,而不编辑服务定义

  • 使用 systemd 看门狗支持重新启动应用程序

  • 使用键盘快捷键启动/停止 systemd 服务 [关闭]

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    ssh 无法协商:“找不到匹配的密码”,正在拒绝 cbc

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    如何卸载内核模块“nvidia-drm”?

    • 13 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Wong Jia Hau ssh-add 返回:“连接代理时出错:没有这样的文件或目录” 2018-08-24 23:28:13 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST
  • Martin Hope
    Bagas Sanjaya 为什么 Linux 使用 LF 作为换行符? 2017-12-20 05:48:21 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve