Back to Netdata

Systemd Device Unit Failed State

src/health/guides/systemdunits/systemd_device_unit_failed_state.md

2.10.32.3 KB
Original Source

Understand the alert

This alert is triggered when a systemd device unit enters a failed state. If you receive this alert, it means that a device managed by systemd on your Linux system has encountered an issue and is currently in a non-operational state.

What is a systemd device unit?

Systemd is a system and service manager for Linux operating systems. A device unit in systemd is a unit that encapsulates a device in the system's device tree (e.g., /sys directory). The device units are used to automatically discover and manage devices present on the system.

What does a failed state mean?

A failed state implies that the device has encountered an issue and is currently non-operational. The problem could be related to hardware, driver, or configuration issues.

Troubleshoot the alert

  1. Identify the failed device unit:

    Check the systemd status for failed units using the following command:

    systemctl --failed --type=device
    

    This will show you the list of device units that are currently in a failed state.

  2. Check logs for errors:

    Use the journalctl command to check the logs for any error messages related to the failed device unit. For instance, if the failed unit is example.device, you can execute:

    journalctl -xe -u example.device
    

    This will show you the logs with any error messages that will help you identify the root cause of the failure.

  3. Fix the issue:

    Depending on the results from the previous steps, you might need to:

    • Check the hardware connections and make sure they are properly connected.
    • Update or reinstall the device driver.
    • Check and correct device configurations if needed.
  4. Restart the device unit:

    Once the issue has been fixed, restart the device unit using systemctl:

    sudo systemctl restart example.device
    

    Replace example.device with the specific device unit name.

  5. Validate the fix:

    Check if the device unit is now operational by executing the following command:

    systemctl status example.device
    

    This should show you that the device unit is now active and running properly.

Useful resources

  1. Systemd Device Units