Solved

Where are kernel messages?

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

615 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