Solved

Where are kernel messages?

Posted on 2004-08-21
2
262 Views
Last Modified: 2010-04-21
I am trying to add some lines in the kernel's source code, so that when that line is hit, a message will be generated for me to debug. Normally I would do it right away by adding an fprintf function in the source, and wait until that code is processed.

But for the kernel, the issue is different. The standard C libraries are not there, even when I add a library, it generates an error. So I cannot compile the kernel including the standard c libraries for my purpose.

However; there is a function such as this;

printk(KERN_DEBUG "any string"))

I can use this function right away but the problem is that, the system supresses some messages from reaching the destination (/dev/console);

This is the log;

Aug 19:02:17:14 linux kernel: NET: 19 messages supressed

Indeed this was put there to reduce the number of messages to be seen on the screen, but it would also disable the messages I deliberately put there. Now any ideas about what I can do (perhaps another means to send messages from kernel - or disabling that surpassing problem ?)

0
Comment
Question by:Xephyr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 23

Accepted Solution

by:
Mysidia earned 500 total points
ID: 11862688
They are often duplicates of the same message that are being suppressed.
So instead of printing it 19 times it prints it once then says suppressed

I think klogd may be inhibiting most of the messages from appearing on console though:
do a  ps axwwwu |grep klogd

Is   -c 3   in the command line?    It may be by default, to suppress messages less severe
than KERN_ERR from going to the console

(Make sure -n isn't in the command line before proceeding with just killing klogd.. if it is, you may need to update your
init configuration and reboot)

you could try killing and restarting it with
klogd -c 7
 instead

Consider updating  /etc/syslog.conf   and logging your debug messages to a file of your choice instead

[The best way to deal with kernel debug messages is usually to have syslogd log them to a special file...
flooding the console with debug messages is not fun.]


0
 

Author Comment

by:Xephyr
ID: 11862693
Very well then but I have an even more complicated question I will post as a new thread here...
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question