[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How do I suppress dpms mode setting messages on text console?



Stephen Powell wrote:
> I consider these messages to be noise messages and I wish to suppress them.
> I don't mind if they are written to the kernel log, but I don't ever want to
> see them written to the console itself (except maybe during boot).

Try this (meaning that I didn't and think it will accomplish this but
didn't test it myself):

  # dmesg -n5

I always set dmesg -n5 in order to avoid the flood of kernel messages
concerning blocked packets from my firewall.  But perhaps a different
level setting would be needed for your issue.

Here is the explanation:

The dmesg -nNUMBER sets the level at which the kernel will log
messages to the console.  The level is less than the number.
To avoid logging KERN_INFO 6 or lower must be used.  Here is the
definitions from the Linux kernel.

   #define KERN_EMERG   "<0>" /* system is unusable                    */
   #define KERN_ALERT   "<1>" /* action must be taken immediately      */
   #define KERN_CRIT    "<2>" /* critical conditions                   */
   #define KERN_ERR     "<3>" /* error conditions                      */
   #define KERN_WARNING "<4>" /* warning conditions                    */
   #define KERN_NOTICE  "<5>" /* normal but significant condition      */
   #define KERN_INFO    "<6>" /* informational                         */
   #define KERN_DEBUG   "<7>" /* debug-level messages                  */

The kernel default is 8 so that all messages are logged to the console.
At least one other distro sets this to 3 in /etc/syscontrol/init
and so users there never see console messages.  Debian doesn't make
this policy decision anywhere that I know of and so the level is left
unchanged at the default kernel value.  I set it in my Shorewall init
script since I am using it to block packet messages.

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: