systemctl gives the immediate state of the service while journalctl often explains why the main process has stopped.
Steps.
- Read the status – Run systemctl status on the service.
- View the dedicated logs — Use journalctl -u for the period of the incident.
- Check configuration — Run the service specific test command if it exists.
- Control of dependencies and ports — Check files, permissions, DNS and occupied ports.
- Restart after correction — Re-launch only after identifying and correcting the error.
Commands
systemctl status nginx
journalctl -u nginx --since '-30 min'
ss -lntup
Key takeaways
- A repeat ROUND can erase the useful context of the first failure.
- Use journalctl –(3) to reduce noise.
- Check configuration changes just before the incident.