On Wed, 2001-11-28 at 12:51, Gabor Gludovatz wrote:
> could someone please tell me how could I get klogd not to log every event
> to the console as well? syslog logging would be enough, but I haven't
> found any switch or configuration parameter...
> syslog.conf is set up correctly and if I kill klogd, there are no kernel
> messages on the console.. and no kernel messages in the syslog either :)
> help! :)
The man page for klogd around line 111 is exactly what you want:
The klogd daemon also allows the ability to alter the pre
sentation of kernel messages to the system console. Con
sequent with the prioritization of kernel messages was the
inclusion of default messaging levels for the kernel. In
a stock kernel the the default console log level is set to
7. Any messages with a priority level numerically lower
than 7 (higher priority) appear on the console.
Messages of priority level 7 are considered to be 'debug'
messages and will thus not appear on the console. Many
administrators, particularly in a multi-user environment,
prefer that all kernel messages be handled by klogd and
either directed to a file or to the syslogd daemon. This
prevents 'nuisance' messages such as line printer out of
paper or disk change detected from cluttering the console.
When -c is given on the commandline the klogd daemon will
execute a system call to inhibit all kernel messages from
being displayed on the console. Former versions always
issued this system call and defaulted to all kernel mes
sages except for panics. This is handled differently
nowardays so klogd doesn't need to set this value anymore.
The argument given to the -c switch specifies the priority
level of messages which will be directed to the console.
Note that messages of a priority value LOWER than the
indicated number will be directed to the console.
For example, to have the kernel display all mes
sages with a priority level of 3 (KERN_ERR) or more
severe the following command would be executed:
klogd -c 4
The definitions of the numeric values for kernel messages
are given in the file kernel.h which can be found in the
/usr/include/linux directory if the kernel sources are
installed. These values parallel the syslog priority val
ues which are defined in the file syslog.h found in the
/etc/init.d/klogd even has a KLOGD variable suitable for passing the -c
argument. I'd read up on the values in the kernel.h file to determine
at what level you wish to stop logging to console.
Manpages are your friends.
- From: Gabor Gludovatz <firstname.lastname@example.org>