From the course: LPIC-1 Exam 102 (Version 5.0) Cert Prep
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Filter journal data by criteria - Linux Tutorial
From the course: LPIC-1 Exam 102 (Version 5.0) Cert Prep
Filter journal data by criteria
- [Instructor] Logs need to be rotated so they don't get too large. The configuration file for log rotate is /etc/logrotate.conf. Type into a terminal sudo space les space -N space /etc/logrotate.conf and hit Enter. We can see that the very top uncommented line is weekly. This is the log rotate schedule. The next uncommented line says rotate space four. This is how many weeks worth of logs to keep. Line number nine instructs to create new log files after the old ones have been rotated. This is good to have turned on because some services will only log to a file that already exists. Line number 12 says to use a date in the suffix of the rotated file name. Line 15 will compress the log files if uncommented. The last line we'll look at is line number 18. Line 18 includes all configuration files and /etc/logrotate.d. If we wanted to create a log rotation scheme for specific filters, you could create a config file…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
(Locked)
Locate and interpret system log files4m 57s
-
Read the system journal3m 23s
-
(Locked)
Configuration of logrotate2m 33s
-
(Locked)
Filter journal data by criteria1m 25s
-
(Locked)
Rsyslog actions1m 41s
-
(Locked)
Clear old systemd journal data2m 33s
-
(Locked)
Retrieve systemd journal data from a rescue system2m 18s
-
(Locked)
About syslog, rsyslog, and syslog-ng3m 32s
-
(Locked)
-
-
-
-
-
-
-
-
-