Interview Prep/Linux/Processes, Signals & systemd

What is journald and how do you query logs?

BeginnerConceptProcesses, Signals & systemd
Answer

journald collects stdout/stderr of units, syslog messages and kernel logs into an indexed binary journal.

journalctl -u nginx -f                    # follow a unit
journalctl -u api --since "1 hour ago" -p err
journalctl -b -1 -e                       # previous boot, jump to end
journalctl _PID=1234
journalctl -o json-pretty -n 5
All Linux questions Roadmap: Linux

More on Processes, Signals & systemd