LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-09-2010, 03:15 AM   #1
greplinux
Member
 
Registered: Jun 2007
Posts: 118

Rep: Reputation: 17
klogd


Hi All,

I tried to block the logging of 'printk' messages with priority 'KERN_INFO' by setting the log level to 3 using klogd.

---
klogd -c 3.
---

Even after that, I am getting those printk messages in '/var/log/messages'.
I have also verified the current log level by using the following.

----
cat /proc/sys/kernel/printk

Output is:
3 4 1 7
----

Can anyone guide me to achieve what I am looking for.

BTW:
I am using 'Fedora core 6 linux (2.6.18)'


Thanks,
 
Old 02-09-2010, 08:38 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,359
Blog Entries: 55

Rep: Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546
Quote:
Originally Posted by greplinux View Post
klogd -c 3
"-c" sets the log level of messages on the console. Edit the /var/log/messages line in /etc/syslog.conf then restart the Syslog service.


Quote:
Originally Posted by greplinux View Post
I am using 'Fedora core 6 linux (2.6.18)
You really, really should not. That release of Fedora is so deprecated it isn't even funny.
 
Old 02-10-2010, 03:32 AM   #3
greplinux
Member
 
Registered: Jun 2007
Posts: 118

Original Poster
Rep: Reputation: 17
Hi unspawn,

Thank you very much for your reply.

I think by specifying 'debug.none' we can stop the debug messages logging from /var/log/messages.


I am looking for a way to prevent only the printk messages with a particular priority from logging in.

Is it possible?

I have very little knowledge in this. Please let me know if you want more information from my side.

Thanks,
 
Old 02-10-2010, 10:38 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,359
Blog Entries: 55

Rep: Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546
You probably mean facility LOG_KERN and priority LOG_INFO, so setting it to "kern.notice" should show only messages with priority "notice" and higher. However note that messages of the informational level do just that: informing you of something so you can basically ignore them. Syslog itself will trigger a duplicate message warning if the amount of successive logged messages exceeds the threshold. Also note that using "kern.notice" will block out all informational level messages the kernel sends. This may be too drastic. One way to overcome the problem could be to redirect the application to use one of the LOG_LOCAL slots for logging instead if possible, or else look at syslog-ng which has qualitatively better filtering compared to syslog.
 
Old 02-11-2010, 11:55 PM   #5
greplinux
Member
 
Registered: Jun 2007
Posts: 118

Original Poster
Rep: Reputation: 17
Hi unspawn,

I mean 'KERN_INFO', which we use in drivers to output debug message.

Thanks,
 
Old 02-12-2010, 12:42 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,359
Blog Entries: 55

Rep: Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546
Quote:
Originally Posted by greplinux View Post
I mean 'KERN_INFO', which we use in drivers to output debug message.
OK, thanks, but that doesn't change my reply. besides, isn't a "debug" setting something that should be governed by per-module arguments (/etc/modprobe.conf, /etc/modprobe.d/)?
 
Old 02-16-2010, 04:14 AM   #7
greplinux
Member
 
Registered: Jun 2007
Posts: 118

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by unSpawn View Post
You probably mean facility LOG_KERN and priority LOG_INFO, so setting it to "kern.notice" should show only messages with priority "notice" and higher. However note that messages of the informational level do just that: informing you of something so you can basically ignore them. Syslog itself will trigger a duplicate message warning if the amount of successive logged messages exceeds the threshold. Also note that using "kern.notice" will block out all informational level messages the kernel sends. This may be too drastic. One way to overcome the problem could be to redirect the application to use one of the LOG_LOCAL slots for logging instead if possible, or else look at syslog-ng which has qualitatively better filtering compared to syslog.

Hi there,

I am not able to understand your explanation. Such is my knowledge in syslog and logging mechanism :-( . Can you please explain further or else give me some pointers to refer.

Still I am not able to do what I intend?

Thanks,
 
  


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
klogd won't start pobbz Debian 5 08-24-2007 05:37 AM
'klogd' problem NervusMagnus Linux - Newbie 3 05-27-2007 03:11 PM
klogd and syslog asahlot Linux - Kernel 1 09-22-2006 10:35 AM
why my ssytem have klogd and syslogd? xcore_on Linux - Newbie 1 05-21-2006 09:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:13 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