Examine the following snippet from the rsyslog.conf file.
kern.crit /dev/console
kern.info; kern.!err /var/adm/kernel.log
What do these two rules mean?
A.
Direct all kernel messages of the priority crit and higher to machine console. Additionally, log all
kernel messages that come with priorities from info and up in the /var/adm/kernel.log file.
B.
Direct all kernel messages of the priority crit and higher to machine console. Additionally, log all
kernel messages that come with priorities from info up to warning in the /var/adm/kernel.log file.
C.
Direct all kernel messages of the priority crit and higher to machine console. Additionally, log all
messages that come with priorities from info and err in the /var/adm/kernel.log file.
D.
Direct all kernel messages of the priority crit and higher to machine console. Additionally, log all
kernel messages that come with priorities other than info and err into the /var/adm/kernel.log file.
Explanation:
Example:kern.* /var/adm/kernel
kern.crit @finlandia;RFC3164fmt
kern.crit /dev/console
kern.info;kern.!err /var/adm/kernel-info
The first rule direct any message that has the kernel facility to the file /var/adm/kernel.
The second statement directs all kernel messages of the priority crit and higher to the remote host
finlandia. This is useful, because if the host crashes and the disks get irreparable errors you might
not be able to read the stored messages. If they’re on a remote host, too, you still can try to find
out the reason for the crash.
The third rule directs these messages to the actual console, so the person who works on the
machine will get them, too.
The fourth line tells rsyslogd to save all kernel messages that come with priorities from info up to
warning in the file /var/adm/kernel-info. Everything from err and higher is excluded.
Here are some of the web-sites we suggest for our visitors.