Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On a CentOS 6 Server, sometimes messages (errors, warnings) appear on top of the login prompt on the monitor physically attached to the server.

I can't seem to find a log file (/var/log/?) that these messages are in though, so the only way to see them is to turn on the monitor attached to the server. Is there a way to send them to a log file so I can see them via ssh, etc? Are they appearing on the screen because there's no log file set-up for them?

share|improve this question
up vote 3 down vote accepted

You need to check your syslog.conf file. This is normally found is /etc/syslog.conf or rsyslog.conf. That is, unless you are using syslog-ng. Anyway, it looks like that you have a line that says something along these lines:

kern.*                                                 /dev/console

This basically says log anything that is related to the kernel, to the console. If you want these logs going somewhere else, you need to modify the destination of the logs. Such as:

kern.*                                                  /var/log/kern

Once you make your changes, make sure you restart the syslog service.

share|improve this answer
+1, thanks, The first line in your answer was there, but commented out. Apparently it was doing that anyway despite the comment. I've changed the line to send it to a log and restarted- I'll find out it a second if its working. – Nick Jun 19 '12 at 21:46
Make sure nothing else on there goes to /dev/console. By default there shouldn't be, but you never know. – Eric Jun 19 '12 at 21:48
Thanks, marking solved. That was the only thing going to console despite being commented out. This was on a fresh install of CentOS 6.2 minimal, so apparently these are the default settings. – Nick Jun 19 '12 at 21:54
As an interesting note, the messages now go to the log and to the console. Maybe it logs to the console by design, whether you tell it to or not? – Nick Jun 20 '12 at 6:36
It shouldn't if you don't have anything set to /dev/console. Can you give an example of the log? – Eric Jun 20 '12 at 13:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.