LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-02-2007, 02:56 PM   #1
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Rep: Reputation: 100Reputation: 100
How to see what application uses hard drive ?


Hi !

My HDD led is on 1 time per second, but i use nothing. No transfert, no app launched (only X).

I disabled rc.syslog and rc.hald, but they aren't faulty.
Top isn't very useful.

Using telinit 1 stops those accesses.

Any idea ?

Last edited by Linux.tar.gz; 12-02-2007 at 03:02 PM.
 
Old 12-02-2007, 04:06 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Wonder if the machine is using swap space?

Brian
 
Old 12-02-2007, 04:16 PM   #3
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by Linux.tar.gz View Post
My HDD led is on 1 time per second, but i use nothing. No transfert, no app launched (only X).

I disabled rc.syslog and rc.hald, but they aren't faulty.
Top isn't very useful.

Using telinit 1 stops those accesses.

Any idea ?
Yes, when you are in single user mode, you've disabled most of the daemons that would be writing log messages and other information to the drive periodically.
 
Old 12-02-2007, 04:51 PM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
You could try manually shutting down daemons one at a time until the disk access stops. You could also use lsof to see what processes are accessing the hard disk.
 
Old 12-03-2007, 02:55 PM   #5
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Original Poster
Rep: Reputation: 100Reputation: 100
I disabled all i could in rc.d, but i always see that hdd led light every second !!!
I didn't started X.
I tried lsof, but there's too much info for me. Maybe you have some tips about it ?
At least, gkrellm told me that it's sda (where i have / and /home) which is accessed. Both sda1 and sda2 are simultaneously accessed with writings only (orange krellms).

Last edited by Linux.tar.gz; 12-22-2007 at 01:04 PM.
 
Old 12-03-2007, 04:48 PM   #6
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
You could try filtering the output by specifying a directory hierarchy. For example, to display open files under /home you could use:
Code:
lsof +D /home
I don't recommend that for the root directory "/" - it may be worth checking /tmp and /var though.
 
Old 12-03-2007, 05:40 PM   #7
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by Linux.tar.gz View Post
I disabled all i could in rc.d, but i always see that hdd led light every second !!!
I didn't started X.
I tried lsof, but there's too much info for me. Maybe you have some tips about it ?
At least, gkrellm told me that it's sda (where i have / and /home) which is accessed. Both sda1 and sda2 are simultaneously accessed.
You could always put a piece of tape over the light...

People use to do that with low oil indicator lights on cars.
 
Old 12-04-2007, 01:55 PM   #8
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Original Poster
Rep: Reputation: 100Reputation: 100
Well i can't isolate the faulty process !
I think i need some kind of real-time viewer, some kinda tail. lsof gives me too much output and those accesses may be anywhere on fs.
 
Old 12-04-2007, 02:26 PM   #9
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
If it's a log file then maybe

Code:
lsof +D /var/log
might help? Have you tried turning off syslogd?

Last edited by dive; 12-04-2007 at 02:27 PM.
 
Old 12-04-2007, 06:55 PM   #10
rg3
Member
 
Registered: Jul 2007
Distribution: Fedora
Posts: 527

Rep: Reputation: Disabled
I second the request to see if the machine is using swap space, which hasn't been really clarified.

If that's not the case, another alternative is to use the inotify tools (package recently added to slackware-current but I suppose there's no problem in compiling it yourself). With "inotifywatch" you can recursively monitor a directory hierarchy during a period of time. So you can monitor, let's say, /var, or /usr, or /tmp or whatever for 3 seconds and see which files are being accessed or modified. It will not tell you the process directly, but by letting you see which actual files are being touched, you can guess which process is accessing the hard drive because you'll have more information to filter the output of "lsof", or simply by file name you could guess the process.
 
Old 12-08-2007, 05:55 PM   #11
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Original Poster
Rep: Reputation: 100Reputation: 100
I disabled logs.
I disabled almost all services.
Swap used is 0 k.

Ok for inotify. I'll try it.
Thanks and stay tuned.
 
Old 12-09-2007, 05:40 AM   #12
jjthomas
Member
 
Registered: Jan 2004
Location: Tacoma, WA
Distribution: Slackware 14
Posts: 265
Blog Entries: 2

Rep: Reputation: 34
I'm at work, but I run gkrellm on my home computer. gkrellm updates about once a second and one of the things it checks is drive space. Have you quit out of gkrellm? Also is gkrellmd running? And do you have smartd installed and running?

-JJ

Last edited by jjthomas; 12-18-2007 at 09:35 PM. Reason: typo
 
Old 12-09-2007, 06:33 AM   #13
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
And you could also try 'swapoff' just to be double sure.

I seem to remember gkrellm used to show activity on one of my old hard drives. but that stopped when I got myself a new big one. I never did find out what it was though.
 
Old 12-09-2007, 11:59 AM   #14
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
I will go with you using a journaled file system like ext3, reiserfs ... those write to the journal all the time, if using ext3 you could test this by simply changing to ext2 in your /etc/fstab and rebooting then see if you still have the access to the drive going on.
 
Old 12-09-2007, 01:48 PM   #15
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
I've been running gkrellm for quite a while and although it updates the info often, it never writes to the HDD (AFAIK) on a regular basis ... only very rarely (like when saving the config file). As for journaled filesystems, it is possible, but I have JFS and if I'm not doing anything, there are 0 (zero) writes to the HDD.

I'm betting it's some daemon that's logging a lot of things. Have you tried starting or switching to single user mode ?
 
  


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
Moving files from a Linux hard drive to a Windows Vista Premium hard drive WolfMan51 Linux - Hardware 5 07-12-2011 09:19 AM
Ubuntu: Installed to external hard drive; boot to primary hard drive gives error 22 dcorb62 Linux - General 7 09-04-2007 11:28 PM
Copying files from internal Hard drive to USB 2.0 Hard Drive is NOT Behaving tubatodd Ubuntu 4 02-19-2007 04:32 PM
Installing grub to external USB hard drive for later use as internal hard drive dhave Linux From Scratch 2 12-10-2005 08:48 AM
2 hard drive in system mirror 1st hard drive sburns76247 Linux - General 2 12-21-2004 01:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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