Solved

Where are kernel messages?

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

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…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

840 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