Inspecting a service
Before restarting a service, read its state and recent logs. A restart may clear the immediate symptom while hiding the reason it occurred.
Start with the unit state
systemctl status example.service --no-pager
systemctl is-active example.service
systemctl is-enabled example.serviceReplace example.service with a real unit name. Active state and boot-time enablement are separate properties. A service can be running without being enabled, or enabled while currently stopped.
Read a bounded log window
journalctl -u example.service --since "30 minutes ago" --no-pager -n 100A short window is often easier to interpret than a full log history. Compare the first error with the events immediately before it. Later errors may only be consequences.
Inspect the effective definition
systemctl cat example.service
systemctl show example.service -p FragmentPath -p DropInPathsLocal drop-ins can change how a packaged unit behaves. Read the unit and its overrides together. Unit definitions and logs may contain sensitive values; review them before sharing.
Further reading: systemctl documentation.