1833431 Members
3235 Online
110052 Solutions
New Discussion

Console Message

 
SOLVED
Go to solution
Shahul
Esteemed Contributor

Console Message

Hi

I have a D class server with terminal console. My problem is some warning/error messages are keep on coming on console. Can I see this messages in some other log files? If yes which is that file. I checked in syslog.log, but it is not getting logged there. How to arrest this console messages?

Thanks in advance

Shahul
2 REPLIES 2
Sridhar Bhaskarla
Honored Contributor
Solution

Re: Console Message

Shahul,

Check your /etc/syslog.conf file. All the alert messages will go to console as well to the root mail. The default configuration will not send the alert messages to syslog.log If you don't want them to appear in the console modify your /etc/syslog.conf file to point to some other file. Modify the line that says "*.alert console" to "*.alert /var/adm/syslog.log" or someother file.

It is not recommended to turn off the alert messages appearing on the console. But it's your decision.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Bill Hassell
Honored Contributor

Re: Console Message

Start by making sure /etc/syslog.conf has an entry like this:

*.info;mail.none /var/adm/syslog/syslog.log

The mail.none entry keeps all mail messages out of syslog.log. Then signal syslogd to reread it's configuration file:

kill -HUP $(cat /var/run/syslog.pid)

The setting *.info will cause all messages sent to syslogd (at the info level and higher) to be logged into syslog.log. You can test this with the logger command as in:

logger -t LoggerTest -p kern.info -i Testing

You'll see the message logged into syslog.log. and to see the same message logged to the console, there must be a line such as:

*.info;mail. /dev/console

NOTE: some programs ignore Unix convention to report status and errors through syslog and instead, write directly to /dev/console. These messages will not be logged to syslog. The writer of the program needs to change the program.


Bill Hassell, sysadmin