Solved

Where are kernel messages?

Posted on 2004-08-21
2
256 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
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

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…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now