LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-17-2009, 11:05 AM   #1
<Ol>Origy
Member
 
Registered: Aug 2003
Location: Slovenia
Distribution: Arch, Debian, Embedded
Posts: 136

Rep: Reputation: 15
Intercepting Full HDD I/O


Hey! How can I intercept and analyze any kind of (IDE) hard disk communication in linux? And I don't mean those little disk monitors that only show you reads/writes. I mean any kind of traffic... disk reads, writes, commands for disk spinup and spindown, HDD head seek and parking commands, anything and everything!
 
Old 11-17-2009, 02:27 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by <Ol>Origy View Post
Hey! How can I intercept and analyze any kind of (IDE) hard disk communication in linux? And I don't mean those little disk monitors that only show you reads/writes. I mean any kind of traffic... disk reads, writes, commands for disk spinup and spindown, HDD head seek and parking commands, anything and everything!
Since you're using Linux, you can always look at the source code for the IDE drivers, and get everything you need from it...
 
Old 11-18-2009, 12:33 AM   #3
<Ol>Origy
Member
 
Registered: Aug 2003
Location: Slovenia
Distribution: Arch, Debian, Embedded
Posts: 136

Original Poster
Rep: Reputation: 15
I assume this will require me to recompile the kernel with the new IDE drivers. What methods would you recommend to be added to the driver in order to be able to monitor the traffic from userspace?
 
Old 11-18-2009, 08:33 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by <Ol>Origy View Post
I assume this will require me to recompile the kernel with the new IDE drivers. What methods would you recommend to be added to the driver in order to be able to monitor the traffic from userspace?
Maybe, but as a first step, I'd look at the code. There could very well be hooks in place right now, to allow user-space monitoring. You'd just have to write a program to look at them.
 
Old 11-19-2009, 05:57 AM   #5
<Ol>Origy
Member
 
Registered: Aug 2003
Location: Slovenia
Distribution: Arch, Debian, Embedded
Posts: 136

Original Poster
Rep: Reputation: 15
Hmm, kernel hooks... thanks for pointing that out to me, I was originally leaning towards printk() function. Well basically I'm trying to do something I've never done before (first time kernel hacking), and I'm definitely expected to run into trouble. I took a brief look at the drivers/ide, and drivers/ata directories of the kernel source tree, and there are indeed a lot of files in here to check out. Any suggestions which could be of interest? I'm guessing all those that begin on "ide-" and are potential candidates.

My disk model: ST94011A

EDIT: 2.6.30.5

Last edited by <Ol>Origy; 11-19-2009 at 03:02 PM.
 
Old 11-19-2009, 01:31 PM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Moved to linux-Kernel
 
  


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
Full Slackware installation. How much space on hdd do i need? QueenZ Slackware 7 02-26-2009 07:27 AM
Gentoo Emerge Failure, Now HDD is Full ! tionik06 Linux - Software 2 07-08-2005 08:33 PM
Linux not detecting Full HDD Size rootking Linux - Hardware 2 04-08-2004 08:31 PM
HDD seems to be full, but is not! nyk Linux - Software 3 02-02-2004 03:34 AM
Session lasted less than 10 seconds. Your HDD maybe full pnh73 Red Hat 6 09-02-2003 07:48 PM

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

All times are GMT -5. The time now is 06:32 AM.

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