XK0-005 · Question #158
A Linux administrator wants to configure log messages of critical or higher severity levels from the cron utility to be logged to the console. Which of the following will accomplish this objective?
The correct answer is B. Edit the /etc/rsyslog.conf file to include the line cron.emerg.* /dev/console. The administrator aims to configure the system to send critical or higher severity log messages from the cron utility to the console.
Question
A Linux administrator wants to configure log messages of critical or higher severity levels from the cron utility to be logged to the console. Which of the following will accomplish this objective?
Options
- AEdit the /etc/logrotate.d/cron file to include the line cron.emerg.* /dev/console
- BEdit the /etc/rsyslog.conf file to include the line cron.emerg.* /dev/console
- CEdit the /etc/logrotate.conf file to include the line cron.emerg.* /dev/console
- DEdit the /etc/rsyslog.d/conf file to include the line cron.emerg.* /dev/console
How the community answered
(24 responses)- B92% (22)
- C4% (1)
- D4% (1)
Why each option
The administrator aims to configure the system to send critical or higher severity log messages from the cron utility to the console.
Files in `/etc/logrotate.d/` are used by `logrotate` to manage the archiving and deletion of log files, not to configure real-time message routing to the console.
Syslog (specifically `rsyslog` on modern Linux systems) manages log message routing based on facility and severity. Editing `/etc/rsyslog.conf` and adding `cron.emerg.* /dev/console` creates a rule that directs all log messages from the `cron` facility with severity 'emerg' or higher to the system console.
The `/etc/logrotate.conf` file is the main configuration file for `logrotate`, defining global log rotation policies, and is not used for real-time log message forwarding.
While rsyslog can use files in `/etc/rsyslog.d/`, the specific file name `conf` is not standard, and `/etc/rsyslog.conf` is the primary and most common location for such global configuration directives.
Concept tested: Syslog configuration for routing messages by facility and severity
Source: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-configuring_system_logging
Topics
Community Discussion
No community discussion yet for this question.