Reese Knowledgebase

Eliminate messages from system console

View Kristian Reese's profile on LinkedIn


If you like this article, please +1 or Recommend via FB with the provided buttons above:

Article ID: 31
by: Reese K.
Posted: 24 Apr, 2012
Last updated: 09 Jul, 2013
Views: 4246

How to suppress NetApp console logging

While working from the NetApp command line, it can become very frustrating when notices are constantly logging to the console while trying to work.  In order to disable these messages from logging to console, edit, or create (if nonexistent) /etc/syslog.conf

The NetApp should have a sample file for viewing at /etc/syslog.conf.sample.  Beware that when creating syslog.conf, as mentioned in the conf.sample file, # You must use TABS for separators between fields. so beware and do not copy paste from my site into your syslog.conf file.

If /etc/syslog.conf does not exist the syslogd daemon will output all log messages of priority info or higher to the console and to the file /etc/messages.

Here is a snippet from the example file:

The level describes the severity of the message, and is a keyword from the following ordered list (higher to lower): emerg, alert, crit, err, warning, notice, info, and debug. - See more at: http://www.wafl.co.uk/syslogconf/#sthash.pnEBLPDy.dpuf
# Log messages of priority info or higher to the console and to /etc/messages
*.info                     /dev/console
*.info                     /etc/messages

Solution:

To stop logging to console, comment out or delete the /dev/console line where syslog.conf would look like this:

# Log messages of priority info or higher to /etc/messages
*.info     /etc/messages

I've never tried it, but it may work.  The special level none disables a particular facility, so in theory it may work to change the /dev/console line to:

update: I've tried this and it does work

*.none     /dev/console

Or, log only big events to the console, and everything else to /etc/messages

# Set the alert level for the console
*.err     /dev/console
# Set the alert level for the local messages file
*.info    /etc/messages

After saving the file, there is nothing else to do.  The syslogd daemon reads its configuration file when it starts up during the boot procedure, or within 30 seconds after the /etc/syslog.conf file is modified.

If you want to ensure you continue to get critical logging information sent to /etc/messages, know that the order of priority is as follows:

(higher to lower): emerg, alert, crit, err, warning, notice, info, and debug. - See more at: http://www.wafl.co.uk/syslogconf/#sthash.pnEBLPDy.dpuf
(higher to lower): emerg, alert, crit, err, warning, notice, info, and debug. - See more at: http://www.wafl.co.uk/syslogconf/#sthash.pnEBLPDy.dpuf
The level describes the severity of the message, and is a keyword from the following ordered list (higher to lower): emerg, alert, crit, err, warning, notice, info, and debug. - See more at: http://www.wafl.co.uk/syslogconf/#sthash.pnEBLPDy.dpuf

(higher to lower): emerg, alert, crit, err, warning, notice, info, and debug.

emerg
    A panic condition that results in the disruption of normal service.

alert
    A condition that should be corrected immediately, such as a failed disk.

crit
    Critical conditions, such as hard disk errors.

err
    Errors, such as those resulting from a bad configuration file.

warning
    Warning messages.

notice
    Conditions that are not error conditions, but that may require special handling.

info
    Informational messages, such as the hourly uptime message (see uptime ).

debug
    Debug messages used for diagnostic purposes. These messages are supressed by default.

(higher to lower): emerg, alert, crit, err, warning, notice, info, and debug. - See more at: http://www.wafl.co.uk/syslogconf/#sthash.pnEBLPDy.dpuf

This article was:   Helpful | Not Helpful
External links
http://www.wafl.co.uk/syslogconf/

Prev   Next
mount: RPC: Authentication error; why = Client credential too...     What are Drive Bypass Events (taken from NOW)

RSS