Re: Shorewall logging to stdout
On Thu, Mar 08, 2007 at 08:34:20 -0300, Cassiano Leal wrote:
> Andrei Popescu wrote:
> >Cassiano Leal <cleal@via-rs.net> wrote:
> >
> >>Hi!
> >>
> >>I have two shorewall installations, and it seems to have a quite
> >>annoying habit of logging to the stdout.
> >
> ># /etc/sysctl.conf - Configuration file for setting system variables
> ># See sysctl.conf (5) for information.
> >
> >[...]
> >
> ># Uncomment the following to stop low-level messages on console
> >kernel.printk = 4 4 1 7
> >
> >Regards,
> >Andrei
>
> Ok, I'll try that too.
>
> Where can I find a better explanation to exactly what these settings do?
You can install the documentation package for your kernel, which will be
called kernel-doc-<version> (for older kernels) or linux-doc-<version>
(for newer kernels). <version> is a string denoting the kernel version;
see the output of the "uname -r" command on your machine. Then you can
find documentation on sysctl in the directory
/usr/share/doc/<packagename>/Documentation/sysctl/
where <packagename> is the name of the documentation package that you
installed. I have quoted the relevant part of "kernel.txt.gz" at the end
of this message.
> And: do I need to restart any services in order for it to work?
The settings in /etc/sysctl.conf take effect at the next reboot. You can
change the printk setting with immediate effect with
echo "4 1 1 7" > /proc/sys/kernel/printk
and you can check the setting with
cat /proc/sys/kernel/printk
Only root can change the setting but everyone can read it.
The files in /proc/ are pseudo-files which provide interfaces to kernel
data structures; see "man proc" for details.
===========
excerpt from
/usr/share/doc/linux-doc-2.6.20/Documentation/sysctl/kernel.txt.gz
follows:
==============================================================
printk:
The four values in printk denote: console_loglevel,
default_message_loglevel, minimum_console_loglevel and
default_console_loglevel respectively.
These values influence printk() behavior when printing or
logging error messages. See 'man 2 syslog' for more info on
the different loglevels.
- console_loglevel: messages with a higher priority than
this will be printed to the console
- default_message_level: messages without an explicit priority
will be printed with this priority
- minimum_console_loglevel: minimum (highest) value to which
console_loglevel can be set
- default_console_loglevel: default value for console_loglevel
==============================================================
--
Regards,
Florian
Reply to: