LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-20-2005, 04:53 PM   #1
retiem
Member
 
Registered: Jul 2003
Location: Frankfurt, Germany
Distribution: Mint, Ubuntu, Knoppix, RHEL
Posts: 65

Rep: Reputation: 15
how to disable console logging (Debian Sarge)


Hi folks,
I thought finding the answer to this question would be a piece of cake. But honestly, after lots of googling and linuxquestioning, I have not been lucky!
So, here it is:

After setting my iptables rules, I began to get all these iptables-related messages on the console... so, I just want to tell syslog not to send them to the console, as just to /var/log/messages is enough for me.

How do I do that? I am running Debian Sarge, and here is how my /etc/syslog.conf looks like:

Thanks in advance! I know somebody ougth to know the answer

-------------------------------------------------------------------------------------------------------------

# /etc/syslog.conf Configuration file for syslogd.
#
# For more information see syslog.conf(5)
# manpage.

#
# First some standard logfiles. Log by facility.
#

auth,authpriv.* /var/log/auth.log
*.*;auth,authpriv.none -/var/log/syslog
#cron.* /var/log/cron.log
daemon.* -/var/log/daemon.log
kern.* -/var/log/kern.log
lpr.* -/var/log/lpr.log
mail.* -/var/log/mail.log
user.* -/var/log/user.log
uucp.* /var/log/uucp.log

#
# Logging for the mail system. Split it up so that
# it is easy to write scripts to parse these files.
#
mail.info -/var/log/mail.info
mail.warn -/var/log/mail.warn
mail.err /var/log/mail.err

# Logging for INN news system
#
news.crit /var/log/news/news.crit
news.err /var/log/news/news.err
news.notice -/var/log/news/news.notice

#
# Some `catch-all' logfiles.
#
*.=debug;\
auth,authpriv.none;\
news.none;mail.none -/var/log/debug
*.=info;*.=notice;*.=warn;\
auth,authpriv.none;\
cron,daemon.none;\
mail,news.none -/var/log/messages

#
# Emergencies are sent to everybody logged in.
#
*.emerg *

#
# I like to have messages displayed on the console, but only on a virtual
# console I usually leave idle.
#
#daemon,mail.*;\
# news.=crit;news.=err;news.=notice;\
# *.=debug;*.=info;\
# *.=notice;*.=warn /dev/tty8

# The named pipe /dev/xconsole is for the `xconsole' utility. To use it,
# you must invoke `xconsole' with the `-file' option:
#
# $ xconsole -file /dev/xconsole [...]
#
# NOTE: adjust the list below, or you'll go crazy if you have a reasonably
# busy site..
#
daemon.*;mail.*;\
news.crit;news.err;news.notice;\
*.=debug;*.=info;\
*.=notice;*.=warn |/dev/xconsole
 
Old 04-21-2005, 10:46 AM   #2
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
what do thn about these entries??
--------
# NOTE: adjust the list below, or you'll go crazy if you have a reasonably
# busy site..
#
daemon.*;mail.*;\
news.crit;news.err;news.notice;\
*.=debug;*.=info;\
*.=notice;*.=warn |/dev/xconsole
----------
maybe u should comment these to stop messages from coming to console

regards
 
Old 04-22-2005, 08:56 AM   #3
retiem
Member
 
Registered: Jul 2003
Location: Frankfurt, Germany
Distribution: Mint, Ubuntu, Knoppix, RHEL
Posts: 65

Original Poster
Rep: Reputation: 15
oh believe me I already tried that! It doesn't do it!
Just in case, I restarted syslog every time I modified syslog.conf
Regards.
 
Old 04-29-2005, 11:47 AM   #4
retiem
Member
 
Registered: Jul 2003
Location: Frankfurt, Germany
Distribution: Mint, Ubuntu, Knoppix, RHEL
Posts: 65

Original Poster
Rep: Reputation: 15
OK. Here is how to solve the issue:

edit the script /etc/init.d/klogd and set KLOGD="-c 4"

That's it.
 
Old 04-29-2005, 01:22 PM   #5
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
Quote:
Originally posted by retiem
OK. Here is how to solve the issue:

edit the script /etc/init.d/klogd and set KLOGD="-c 4"

That's it.
thanks for sharing the info
 
Old 04-29-2005, 04:23 PM   #6
retiem
Member
 
Registered: Jul 2003
Location: Frankfurt, Germany
Distribution: Mint, Ubuntu, Knoppix, RHEL
Posts: 65

Original Poster
Rep: Reputation: 15
No problem. I hope this thread be helpful for other linux users in the future.
Regards.
 
Old 06-14-2013, 04:30 AM   #7
crowl
LQ Newbie
 
Registered: Oct 2003
Posts: 25

Rep: Reputation: 0
In which line I have to put
Quote:
KLOGD="-c 4"
?

Here is the content of
/etc/init.d/klogd
Code:
#! /bin/sh
# /etc/init.d/klogd: start the kernel log daemon.

### BEGIN INIT INFO
# Provides:             klogd
# Required-Start:       $syslog
# Required-Stop:        $syslog
# Default-Start:        2 3 4 5
# Default-Stop:         0 1 6
# Short-Description:    Kernel logger
### END INIT INFO

PATH=/bin:/usr/bin:/sbin:/usr/sbin

pidfile=/var/run/klogd.pid
binpath=/sbin/klogd

test -f $binpath || exit 0

test ! -r /etc/default/klogd || . /etc/default/klogd

. /lib/lsb/init-functions

case "$1" in
  start)
    log_begin_msg "Starting kernel log daemon..."
    start-stop-daemon --start --quiet --pidfile $pidfile --name klogd --startas $binpath -- $KLOGD
    log_end_msg $?
    test -d /lib/init/rw/sendsigs.omit.d || mkdir -p /lib/init/rw/sendsigs.omit.d
    test ! -f /lib/init/rw/sendsigs.omit.d/klogd || rm -f /lib/init/rw/sendsigs.omit.d/klogd
    ln -s $pidfile /lib/init/rw/sendsigs.omit.d/klogd
    ;;
  stop)
    log_begin_msg "Stopping kernel log daemon..."
    start-stop-daemon --stop --quiet --retry 3 --exec $binpath --pidfile $pidfile
    log_end_msg $?
    ;;
  restart|force-reload)
    log_begin_msg "Reloading kernel log daemon..."
    start-stop-daemon --stop --quiet --retry 3 --exec $binpath --pidfile $pidfile
    start-stop-daemon --start --quiet --pidfile $pidfile --name klogd --startas $binpath -- $KLOGD
    log_end_msg $?
    ;;
  *)
    log_success_msg "Usage: /etc/init.d/klogd {start|stop|restart|force-reload}"
    exit 1
esac

exit 0
thanks for help.
 
Old 06-14-2013, 05:14 AM   #8
retiem
Member
 
Registered: Jul 2003
Location: Frankfurt, Germany
Distribution: Mint, Ubuntu, Knoppix, RHEL
Posts: 65

Original Poster
Rep: Reputation: 15
Please notice you are looking at a thread which is more than 8 years old! (And about Debian Sarge). Things might have changed in the loooong "meantime"... ;-)

Here is a hint: have you looked inside /etc/default/klogd ?

Last edited by retiem; 06-14-2013 at 05:19 AM.
 
Old 06-14-2013, 07:23 AM   #9
crowl
LQ Newbie
 
Registered: Oct 2003
Posts: 25

Rep: Reputation: 0
oh, didnt noticed. Thanks for pointing out and providing your helpful hint!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix disable logging? lennard Linux - Software 3 12-08-2010 11:00 AM
howto enable logging from BIND 9 on Debian Sarge ? cccc Debian 2 07-07-2005 07:43 PM
Disable logging RH 7.3 qmail-apache etc DropHit Red Hat 3 04-13-2005 05:44 AM
Disable all Apache 2.x logging hakcenter Linux - Networking 2 12-05-2003 01:34 AM
disable logging rsbecker007 Linux From Scratch 2 04-09-2002 10:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration