Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Kernel syslog messages

    I'm forwarding all syslog messages to a file to be parsed by a log monitor app.

    I would like to not receive the kernel messages created during the boot in that file.
    As far as I tried the only way to avoid this is to add:
    kern.none to the line for the redirection in syslog.conf
    Other message levels log thos messages.

    The problem is that this disables any kernel messages, and I would like to receive warning, critical events, etc... from the kernel.

    Anyone has an idea of how could I disable those messages or at least receive only warnings and above messages?


  2. #2
    In /etc/syslog.conf change kern.none to kern.crit;kern.err;kern.warn and redirect to anything you want.
    Linux user 439038 | Ubuntu user 20892

  3. #3
    I tried with all the levels, any level generate the boot kernel messages.


  4. $spacer_open
  5. #4
    Try this
    Code:;kern.!err;kern.!crit     /dev/null
    kern.crit;kern.err                    -/var/log/kern.err
    kern.warn                              -/var/log/kern.warn
    Also ensure syslog.conf doesn't include duplicates or any other lines sending everything to the log file.
    Linux user 439038 | Ubuntu user 20892

  6. #5
    thanks x1a4

    The line reads like this now:
    *.info;kern.err;kern.!info;kern.!notice;kern.!warn /var/log/syslog

    Maybe it has redundant info, bu it works.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts