System and Kernel Logging - Quiz Explanation

The answers you selected are indicated below, along with text that explains the correct answers.
1. Which of the following commands would you use to view the most recent kernel messages?
Please select the best answer.
  A. syslog
  B. logwatch
  C. dmesg
  D. klogd
  The correct answer is C. The command dmesg views the most recent kernel messages. A is incorrect because syslog maintains logfiles, but doesn't output the most recent kernel messages. B is incorrect because logwatch scans the logfiles for specific severity or facility messages. D is incorrect because klogd is another logfile configuration daemon.

2. What entry should you add to /etc/syslog.conf to log only kernel events with the level emergency to /var/adm/emergency?
Please select the best answer.
  A. *.emerg /var/adm/emergency
  B. kern.emerg /var/adm/emergency
  C. kern.* /var/adm/emergency
  D. kern.emerg *
  The correct answer is B. Add the entry kern.emerg /var/adm/emergency to /etc/syslog.conf to log only kernel events with the level emergency to /var/adm/emergency.
A is incorrect because *.emerg /var/adm/emergency will log all events with the level emergency to the logfile /var/adm/emergency. C is incorrect because kern.* /var/adm/emergency will log all kernel events regardless of level to /var/adm/emergency. D is incorrect because kern.emerg * will notify all users of all kernel events with the level emergency.

3. Which of the following files contains FTP specific logs?
Please select the best answer.
  A. /var/log/messages
  B. /var/log/dmesg
  C. /var/log/maillog
  D. /var/log/xferlog
  The correct answer is D. When the ftp server is acting up, the /var/log/xferlog file brings ftp specific debugging.
A and B are incorrect because /var/log/messages and /var/log/dmesg do not log messages specific to FTP. C is incorrect because the /var/log/maillog files stores SMTP messages, not FTP.