Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Write an article for LinuxForums Today! Win Great Prizes!
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > The Linux Kernel > Communicating between user space and kernel space

Forgot Password?
 The Linux Kernel   Compiling, theory, programming or other discussion about the linux kernel

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds
Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 04-25-2005   #1 (permalink)
Just Joined!
 
Join Date: Mar 2005
Posts: 6
Communicating between user space and kernel space

Hi all
i want to write a module which tests a device driver. I want my testing program to sit in the kernel space. For example i am writing test code for testing a flash which has read and write operations. I want my code to be such that,when i insert my module the testing should start automatically and i have to store the log in a file. Please provide some good ideas to do this.

Thanks

Regards
Bala
urs_balan is offline  



Reply With Quote
Old 04-27-2005   #2 (permalink)
Just Joined!
 
Join Date: Nov 2004
Posts: 47
I am not sure my idea is a good idea or not, I just think that it can work.

You may want to implement file operation read on your test driver in kernel space, then use copy_to_user() in that read function to make your data available to user space program, then in your user space program you can store that data to log file as need.
sybvn is offline   Reply With Quote
Old 04-28-2005   #3 (permalink)
Just Joined!
 
Join Date: Mar 2005
Posts: 6
Hi
Thanks for your reply.

I have found out another solution.
There is a daemon process running which captures the log messages from the kernel. It is /sbin/klogd. This daemon takes the messages from the /proc/kmsg and sends to syslog. For saving this daemon to the log file i have edited the file /etc/sysconfig/syslog. KLOGD_OPTIONS=" -c 1 -x -f /home/bala/log.txt". That -f option is used for storing the log to the specified path. This is how i arrived to the solution. I dont know whether there is any more easy ways are there to do this. If you come to know please intimate me.

Thanks

regards
Bala
urs_balan is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
A Newbie's Getting Started Guide to Linux
Learn the basics of the Linux operating systems. Get to know what it is all about, and familiarize yourself with the practical side. Basically, if you're a complete Linux newbie and looking for a quick and easy guide to get you started this is it.
subscribe
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 02:04 AM.






© 2000 - - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.1