[svlug] Linux Firewall Stopping logging of messages on console and in syslog
Tim Utschig
tim at tetro.net
Mon Feb 5 21:23:35 PST 2007
On Mon, Feb 05, 2007 at 11:35:02AM -0800, Prasad Paranjape wrote:
> I have Debian Sarge box set up as firewall. The
> Firewall script with rules runs at the boot time.
> But then my consoles get cluttered with the messages
> and same get logged in /var/log/syslog.
>
> Can I stop cluttering of my console?If so ; any hints?
man klogd:
-c n Sets the default log level of console messages to n.
... 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. ...
... The definitions of the numeric values for kernel messages are
given in the file kernel.h ...
/usr/include/linux/kernel.h (Sarge linux-kernel-headers package):
#define KERN_EMERG "<0>" /* system is unusable */
#define KERN_ALERT "<1>" /* action must be taken immediately */
#define KERN_CRIT "<2>" /* critical conditions */
#define KERN_ERR "<3>" /* error conditions */
#define KERN_WARNING "<4>" /* warning conditions */
#define KERN_NOTICE "<5>" /* normal but significant condition */
#define KERN_INFO "<6>" /* informational */
#define KERN_DEBUG "<7>" /* debug-level messages */
vi /etc/init.d/klogd
KLOGD="-c 3"
invoke-rc.d klogd restart
--
- Tim Utschig <tim at tetro.net>
More information about the Svlug
mailing list