LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-28-2006, 08:48 PM   #1
dudds
Member
 
Registered: Sep 2003
Posts: 36

Rep: Reputation: 15
Monitoring HDD access


Hi Everyone,

I just had an issue with my PC where it was running EXTREMELY slow for a period of time. I noticed that for some reason my HDD was going at 100 miles per hour and wanted to know which process was accessing it. I tried 'top' but it just shows CPU usage which was quite minimal. Any other utilities I could try?
 
Old 12-28-2006, 08:56 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
There are two processes that tend to run periodically that kill performance if they are on your distribution - prelink and beagle. Prelink is pretty much only a problem after the system is installed for a while. Beagle is literally a dog, and I recommend uninstalling it.
 
Old 12-28-2006, 09:04 PM   #3
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Use the lsof command to see what processes are using what files. You can also use the fuser command but lsof is more general. If you wanted to see what processes are using what files on the root partition then the following command would do the trick.
Code:
lsof /
Then you can use the ps command with the ASCII forest output format to see the parent process of the child running whatever command you are interested in diagnosing.
Code:
ps fx
If you can't see the ends of the lines then use the --width parameter to tell ps that you are using a 132 column terminal. That will cause ps to write the entire line and wrap the output.
Code:
ps --width 132 fx

Last edited by stress_junkie; 12-28-2006 at 09:06 PM.
 
Old 12-29-2006, 12:54 AM   #4
dudds
Member
 
Registered: Sep 2003
Posts: 36

Original Poster
Rep: Reputation: 15
Thanks guys for those suggestions. But what I was thinking is that if I see my HDD access light hard on then some process must be accessing the drive to either perform a read or write operation so what I was looking for was a command to see possibly the amount of IO a process was using, or the percentage of time it was waiting for i/o etc. Is there anything like that? I'll keep searching.
 
Old 12-29-2006, 08:21 AM   #5
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
If you have the sysstat Linux utilities installed then you have a few tools to view this sort of thing. You can use iostat, vmstat, and sar to interactively monitor disk activity. You can also use the sar data collector to run periodically and store the information to a file. You can then use the sar utility to analyze the data file.

I would include the instructions to configure the sar data collector but unfortunately the machine where I have set this up is broken. I'm currently writing endless blocks of data to the disk on that machine to see if the disk is bad. The point is that the configuration information is not easily available to me at this particular moment. I can tell you that configuring the sar data collector involves setting up a cron job that runs the sa2 utility about every ten minutes.

Last edited by stress_junkie; 12-29-2006 at 08:27 AM.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
internet access monitoring soumalya Linux - Security 4 12-15-2006 06:33 PM
Module for monitoring disk access novicehacker Linux - Kernel 1 11-23-2006 04:37 AM
Monitoring internet access Schreiberling Linux - Security 1 08-24-2006 08:15 PM
Application for monitoring Wireless Access Points SideShowJohn Linux - Wireless Networking 0 11-18-2003 04:35 PM
Internet access monitoring bmckee Linux - Security 2 02-09-2002 11:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:36 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