SCA_SLES15 practice question 6 of 15

Which statements about log file rotation are true? (Choose two)

Full set: 69 questions
Answer options
A: Configuration files in the /etc/logrotate.d/ directory can override settings in /etc/logrotate.conf. Correct answer
B: The /etc/logrotate.conf file controls which log files will be compressed or deleted based on some regular interval or when the log file reaches a particular size. Correct answer
C: The /etc/cron.daily/logrotate file controls which log files will be compressed or deleted based on some regular interval or when the log file reaches a particular size.
D: Configuration files in the /etc/logrotate.d/ directory can override settings in /etc/cron.daily/logrotate.
E: The /usr/sbin/logrotate program is used to create and configure settings in the /etc/logrotate.conf file.
Correct Answer:
A. Configuration files in the /etc/logrotate.d/ directory can override settings in /etc/logrotate.conf.; B. The /etc/logrotate.conf file controls which log files will be compressed or deleted based on some regular interval or when the log file reaches a particular size.
Explanation

The logrotate utility is managed by the main configuration file /etc/logrotate.conf, which sets global defaults for log rotation policies like interval, size, compression, and deletion. Application-specific configurations are placed in /etc/logrotate.d/. These specific configurations can define different policies for certain log files, effectively overriding the global defaults set in /etc/logrotate.conf for those particular logs. The entire process is typically executed daily by a cron job.

Why Incorrect

C. The /etc/cron.daily/logrotate file is a script that executes the logrotate command; it does not contain the configuration rules itself.
D. Configuration files in /etc/logrotate.d/ define rotation policies; they do not override an executable script like /etc/cron.daily/logrotate.
E. The /usr/sbin/logrotate program is the executable that reads configuration files and performs the rotation; it does not create or edit them.

References

- SUSE Linux Enterprise Server 15 SP5 Administration Guide, Chapter 18, "Viewing and Managing Log Files", Section 18.4, "Managing Log Files with logrotate".

- logrotate(8) man page, which details how options in /etc/logrotate.conf act as defaults and can be overridden in included configuration files.

Scroll to Top