My harddrive is grinding away, and I don't know why
Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
My harddrive is grinding away, and I don't know why
Eversice I upgraded to the Ubuntu Hardy Beta - my harddrive is working constantly, I guessed it's the tracker search tool indexing, but it doesn't slow down when I need the resources, and it drags my pc to his knees. When I end tracker, it still keeps working. How can I find out what process is reading from my drive?
su to root and type top. The top process will be refreshed every 10 seconds.
edit to add:
you can also do a:
ps -ef
this will list all processes and their cpu times. You can get a very good idea of what all is going on on your system with this and top.
Well kjournald is running, I knew that... but I didn't think this could possibly be it. This PC is up for 15 hours - it should have had plenty of time for every-day maintenance.
Isn't there a way to see what processes are reading/writing to the hdd?
You can see every process that is accessing your disk using lsof:
Code:
lsof /dev/hda#
But it'll throw out a lot of processes! Otherwise, iostat will show input/output statistics (hence the name) for a particular disk/partition:
Code:
iostat -m -p /dev/hda
I haven't yet read enough of the manpage to figure out how to get iostat to show which processes are doing the most writing/reading; I'm pretty sure it's possible though.
Iostat is from the device level. It shows how busy the various disk drives are.
A major known bug with iostat is that the 1st set of numbers generated are from last boot time. In other words the 1st set is generally not what you are after. So do multiple iterations of iostat.
for example:
iostat 5 >> /tmp/iostat.out
will write to the iostat.out file every 5 seconds
iostat 5 5 >> /tmp/iostat.out
will write every 5 seconds to the iostat.out file, the 2nd 5 says do to this 5 times and then end.
If Kjournal is the main process running check the cpu time used. If the time is high, it is probably the culprit.
Go find iotop.py and run that.
Hardy has taskstats enabled in the kernel - this will show your I/O users just like top shows CPU/memory.
If you *really* want to know what's hitting what sector(s), go get blktrace. Bit more work to configure, and probably more than you need, but interesting for the detail.
BTW, I don't see the same issue as you on the Beta.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.