GUIDE 15 / INFRASTRUCTURE
Processes, systemd & time
Inspect service behavior and verify clock synchronization.
In this guide
Commands use class paths and example filenames. Replace placeholders and inspect the target before making changes.
Find processes and their parents
A daemon is a background service process. Nginx commonly has a root master and less-privileged workers. pgrep avoids matching a separate grep command in process output.
pgrep -a nginx
ps -C nginx -o user,pid,ppid,args
systemctl cat nginx
systemctl status nginx --no-pagerThe unit’s ExecStart and ExecReload define what systemctl invokes. pidof shows matching PIDs without the additional detail of pgrep -a.
Distinguish reload and restart
Reload asks a service to reread its settings, if supported. Restart stops and starts it. For the observed Nginx setup, reload preserved the master PID and replaced workers; restart replaced both.
systemctl is-active nginx firewalld chronyd sshd
systemctl is-enabled nginx firewalld chronyd sshd
uptime
journalctl -u nginx -n 20 --no-pagerActive means running now. Enabled means configured to start through its unit dependencies, usually at boot. Either can be true without the other. Reloads can briefly show old and new workers together during a graceful transition.
Read the clock state
timedatectl shows local time, UTC, time zone, and synchronization state. Accurate time matters for certificate validity, useful logs, and scheduled jobs.
date
date -u
timedatectl
systemctl status chronyd --no-pager
grep -vE "^#|^$" /etc/chrony.confA running NTP service is not proof of synchronization. Check the selected source and clock correction as well as the summary state.
Inspect chrony measurements
In chronyc sources, ^* marks the selected server and ^+ marks usable combined sources. ^? means the source is not currently selectable. Reach is an octal history register; 377 means the latest eight polls received replies.
chronyc sources
chronyc tracking
sudo ss -ulnp | grep chronydA VM paused or suspended for a long period can have a large offset. Fix time deliberately: a step can affect running tasks. After correction, old RMS history can remain large while current offset is small. UDP 323 on loopback is chrony’s command interface, not a public NTP listener.