Find the answer to your Linux question:
Results 1 to 5 of 5
Hi, 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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2009
    Posts
    3

    Kernel syslog messages


    Hi,
    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?

    Thanks,
    Isaac

  2. #2
    Linux Newbie x1a4's Avatar
    Join Date
    Dec 2006
    Posts
    123
    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
    Just Joined!
    Join Date
    Jul 2009
    Posts
    3
    I tried with all the levels, any level generate the boot kernel messages.

    Thanks,
    Isaac

  4. #4
    Linux Newbie x1a4's Avatar
    Join Date
    Dec 2006
    Posts
    123
    Try this
    Code:
    kern.info;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

  5. #5
    Just Joined!
    Join Date
    Jul 2009
    Posts
    3
    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.

    Isaac

Posting Permissions

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