Mikey’s Linux Field NotesAll topics

GUIDE 15 / INFRASTRUCTURE

Processes, systemd & time

Inspect service behavior and verify clock synchronization.

4 quick lessons · Examples to adapt to your server
In this guide
Find processes and their parentsDistinguish reload and restartRead the clock stateInspect chrony measurements

Commands use class paths and example filenames. Replace placeholders and inspect the target before making changes.

01

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.

COMMANDS & EXAMPLES
pgrep -a nginx
ps -C nginx -o user,pid,ppid,args
systemctl cat nginx
systemctl status nginx --no-pager
Field note

The unit’s ExecStart and ExecReload define what systemctl invokes. pidof shows matching PIDs without the additional detail of pgrep -a.

02

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.

COMMANDS & EXAMPLES
systemctl is-active nginx firewalld chronyd sshd
systemctl is-enabled nginx firewalld chronyd sshd
uptime
journalctl -u nginx -n 20 --no-pager
Field note

Active 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.

03

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.

COMMANDS & EXAMPLES
date
date -u
timedatectl
systemctl status chronyd --no-pager
grep -vE "^#|^$" /etc/chrony.conf
Field note

A running NTP service is not proof of synchronization. Check the selected source and clock correction as well as the summary state.

04

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.

COMMANDS & EXAMPLES
chronyc sources
chronyc tracking
sudo ss -ulnp | grep chronyd
Field note

A 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.