Logs¶
Finding out where a server writes its logs, reading kernel messages, writing your own log entries, keeping log files small, tracking failed logins and audit events, and analysing logs quickly.
Basics: Where logs are kept, log levels and log rotation
Kernel and system¶
-
Kernel messages: hardware, drivers, OOM killer.
-
Write your own messages into the log.
-
Send command output to the journal.
Manage log files¶
-
Rotate, compress and delete old logs.
Logins¶
-
Failed logins and locked accounts.
Audit¶
Analyse¶
From other chapters¶
-
Read the systemd journal. Covered in the chapter systemd.
-
Follow log files live with
tail -f. Covered in the chapter Viewing files. -
Browse and search large log files. Covered in the chapter Viewing files.
-
Filter log lines by a pattern. Covered in the chapter Text processing.
-
Show the login history. Covered in the chapter Orientation.