返回命令列表

Linux command

systemctl-is-failed 命令

文本

Copy it and replace filenames, paths, or keywords as needed.

命令示例

Example

systemctl is-failed

Example

systemctl is-failed unit_name

Example

systemctl is-failed unit1 unit2

Quiet

systemctl is-failed -q unit_name

Example

systemctl is-failed --user unit_name

说明

systemctl is-failed checks if one or more systemd units have failed. It returns exit code 0 if any specified unit is in a failed state, useful for scripting and monitoring.

参数

PATTERN
Unit names or patterns to check (checks all units if omitted)
-q, --quiet
Suppress output, only return exit code
--user
Check user units instead of system units

FAQ

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

systemctl is-failed checks if one or more systemd units have failed. It returns exit code 0 if any specified unit is in a failed state, useful for scripting and monitoring.

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

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

What does PATTERN do in systemctl-is-failed?

Unit names or patterns to check (checks all units if omitted)