LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 09-29-2010, 12:38 PM   #1
L2S
LQ Newbie
 
Registered: Feb 2009
Posts: 5

Rep: Reputation: 0
Kernel logging


I am developing a kernel module using OpenSUSE 11.3(X86_64) Kernel 2.6.34.7-0.2 I am writing debug statements in my module and using a borrowed script below:

clear

echo
echo " ****************************************************"
echo " * NOTE: You must be superuser, logged in as root, *"
echo " * or have sufficient rights to kill/start *"
echo " * daemons and view log messages. This *"
echo " * script will not work, otherwise. *"
echo " ****************************************************"
echo


# Determine which log daemon is installed
SysLogd=syslogd
if [ -f /sbin/rsyslogd ]; then
SysLogd=rsyslogd
fi


# Stop kernel log daemon if running
if [ -f /var/run/klogd.pid ]; then
echo Stopping current klogd...
kill -s SIGTERM `cat /var/run/klogd.pid`
# Delay to let daemon halt
sleep 1
fi


# Stop current daemon if running
if [ -f /var/run/syslogd.pid ]; then
echo Stopping current ${SysLogd}...
kill -s SIGTERM `cat /var/run/syslogd.pid`
# Delay to let daemon halt
sleep 1
fi


# Start new daemon only if 'syslogd'
if [ "${SysLogd}" = "syslogd" ]; then
echo Starting new ${SysLogd}...
/sbin/${SysLogd}
fi

echo Starting log to console...
echo ">>>>>"
echo
cat /proc/kmsg


The problem I am seeing is that I get some good data, but mostly scrambled data. I really need to be able to see my printk statements clearly and consistently, is there a better method then the one above? I haven't done a lot of Linux kernel debugging, but I remember my last experience being a lot better then this when I debugged the hot plug module under fedora.
 
  


Reply



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
kernel logging deathdodger Programming 3 09-20-2010 10:41 PM
Kernel Logging deathdodger Linux - Newbie 1 09-16-2010 11:51 PM
why my kernel is not logging the packets ilnli Linux - General 4 01-23-2005 01:11 PM
Logging kernel messages ugenn Linux - Software 8 01-04-2003 06:11 AM
Kernel Logging Question... WeNdeL Linux - Newbie 5 01-02-2003 03:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 07:51 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
Open Source Consulting | Domain Registration