Systemd-analyze

Aus Foxwiki
Version vom 7. Dezember 2024, 11:50 Uhr von Dirkwagner (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „Use the systemd-analyze verify command to check if a SystemD service file is valid and has no syntax errors. Terminal window sudo systemd-analyze verify /etc/systemd/system/my-service.service If the service file is valid, the command will return nothing. If there are any errors, they will be displayed in the output. Terminal window /etc/systemd/system/my-service.service:3: Failed to add dependency on my-service.service, ignoring: Invalid argument Read…“)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)

Use the systemd-analyze verify command to check if a SystemD service file is valid and has no syntax errors. Terminal window

sudo systemd-analyze verify /etc/systemd/system/my-service.service

If the service file is valid, the command will return nothing. If there are any errors, they will be displayed in the output. Terminal window

/etc/systemd/system/my-service.service:3: Failed to add dependency on my-service.service, ignoring: Invalid argument

Read more about system-analyze ↗️ and systemd

  1. https://akashrajpurohit.com/snippets/verify-a-systemd-service-file/