← 返回命令列表

Linux command

systemctl-reset-failed 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Example

systemctl reset-failed

Example

systemctl reset-failed [unit]

Example

systemctl reset-failed [unit1 unit2 ...]

List

systemctl --failed

说明

systemctl reset-failed clears the "failed" state from one or more units, resetting their state counters. Without arguments, it resets all failed units. When a unit fails (process exits with a non-zero code, terminates abnormally, or times out), it enters the "failed" state with its exit code and status recorded. This state persists until the unit is restarted or explicitly reset with this command. In addition to clearing the failed state, this command also resets: - The start rate limit counter for all unit types (reset to zero). - The restart counter for service units (reset to zero). This is particularly useful when a unit has hit its start rate limit and systemd refuses to restart it. Running reset-failed resets the counter and allows the unit to be started again immediately.

FAQ

What is the systemctl-reset-failed command used for?

systemctl reset-failed clears the "failed" state from one or more units, resetting their state counters. Without arguments, it resets all failed units. When a unit fails (process exits with a non-zero code, terminates abnormally, or times out), it enters the "failed" state with its exit code and status recorded. This state persists until the unit is restarted or explicitly reset with this command. In addition to clearing the failed state, this command also resets: - The start rate limit counter for all unit types (reset to zero). - The restart counter for service units (reset to zero). This is particularly useful when a unit has hit its start rate limit and systemd refuses to restart it. Running reset-failed resets the counter and allows the unit to be started again immediately.

How do I run a basic systemctl-reset-failed example?

Run `systemctl reset-failed` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

Where can I find more systemctl-reset-failed examples?

This page includes 4 examples for systemctl-reset-failed, plus related commands for nearby Linux tasks.