Log Analysis
Cheat sheet · https://pcornel.dk/topic.php?topic=2923
Answer
Log analysis is reading logs to find what happened: filtering by time, unit, priority and keywords, and correlating events across services and hosts.
Remember
Filter first, read second. Use journalctl -o short-precise for exact times and --since/--until. Correlate across hosts only with synchronised clocks. Look for the first error, not the loudest.
First checks
journalctl -b -p err— errors this bootsystemctl --failed— failed unitsdf -h; df -i— space and inodesss -tulpn— listening socketsdmesg -T | tail— recent kernel messages
Commands
journalctljournalctl -b -1
Verify in this order
time window → source → priority → keyword → first error → correlation
Where it usually breaks
First mismatch in persistent intent → provider/parser/generator → kernel/userspace runtime → dependency/security context → logs/counters → consumer-visible read-back; preserve identity/native diagnostic/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2923