Chapter 11: Logs and time
Read and filter the system logs, keep them across reboots and under control, keep the clock right, and use a calm method to diagnose problems.
What you will learn
- Explain journald and rsyslog and filter the journal by unit, priority, boot and time.
- Make the journal persistent, add custom rsyslog files, and rotate logs with logrotate.
- Read timedatectl and chrony output, set the time zone, and add NTP sources.
- Diagnose a failing service from its status, its journal and the wider system logs.
Sections
- Reading the system logs
- Exercise: Find it in the logs
- Keeping logs: persistence and rotation
- Exercise: Keep and rotate your logs
- Keeping the right time
- Exercise: Time zone and time sources
- A method for diagnosing problems
- Exercise: Find and fix a failing service
- Exercise: Logs and time review
- Linux logs and time quiz
- Linux logs and time cheat sheet