LinuxQuestions.org
Review your favorite Linux distribution.
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 03-05-2003, 08:48 AM   #1
Apollo77
Member
 
Registered: Feb 2003
Location: Toronto
Distribution: RH8 / FC1 / Gentoo / Debian / FreeBSD / Centos / Ubuntu
Posts: 182

Rep: Reputation: 35
Why is my HDD accessed non-stop???


Hi,

I'm running Redhat 8.0 on a 1.3 GHz Celeron with 512MB RAM. When I boot from my hard drive, the drive gets accessed continuously and it never stops (even after several hours). This causes everything to run slowly. There is lots of available memory, swap file looks ok, and there is no process hogging CPU.

Can anyone suggest how I can figure out which process is accessing the HDD? Or, does anyone know what else I need to do to solve this issue?

Note: if I boot from a floppy boot disk everything works just fine (but I don't want to do that forever!).

Thanks!
Apollo
 
Old 03-05-2003, 10:55 AM   #2
jetblackz
Member
 
Registered: Mar 2002
Location: Debian Galaxy
Distribution: Debian
Posts: 711

Rep: Reputation: 30
It's logging your every keystroke and mouse click and send them to the secret service...

top
 
Old 03-05-2003, 11:07 AM   #3
cnjohnson
Member
 
Registered: Nov 2002
Location: Nashville
Distribution: FreeBSD, Linux, OS-X
Posts: 544

Rep: Reputation: 30
While it is doing the HD access, run top from the command line:

#top

And post the output.

Redhat, among other distros, uses locate to create and store a dabase of your file systems. Ever use the locate command?

There should be a cron that runs daily to update the database rather than during the day. Check your crontab and see.

Otherwise, top is your friend.

Cheers--
Charles
 
Old 03-05-2003, 01:11 PM   #4
rshaw
Senior Member
 
Registered: Apr 2001
Location: Perry, Iowa
Distribution: Mepis , Debian
Posts: 2,692

Rep: Reputation: 45
Quote:
Originally posted by jetblackz
It's logging your every keystroke and mouse click and send them to the secret service...

top
break out the tin-foil hats
 
Old 03-05-2003, 01:22 PM   #5
Apollo77
Member
 
Registered: Feb 2003
Location: Toronto
Distribution: RH8 / FC1 / Gentoo / Debian / FreeBSD / Centos / Ubuntu
Posts: 182

Original Poster
Rep: Reputation: 35
Sorry, dumb question: how do I check my crontab?

top output while HDD runs continuously (hope format looks ok here):

2:12pm up 5 min, 3 users, load average: 0.28, 0.14, 0.04
59 processes: 57 sleeping, 2 running, 0 zombie, 0 stopped
CPU states: 2.3% user, 1.1% system, 0.0% nice, 96.4% idle
Mem: 505860K av, 160088K used, 345772K free, 0K shrd, 12152K buff
Swap: 522104K av, 0K used, 522104K free 95940K cached

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
910 root 5 -10 17744 9168 2628 S < 1.3 1.8 0:02 X
1073 root 15 0 13120 12M 11532 R 0.7 2.5 0:00 kdeinit
1050 root -51 0 4908 4908 3696 S 0.5 0.9 0:00 artsd
1103 root 15 0 1024 1024 836 R 0.3 0.2 0:00 top
1 root 15 0 484 484 424 S 0.0 0.0 0:03 init
2 root 15 0 0 0 0 SW 0.0 0.0 0:00 keventd
3 root 15 0 0 0 0 SW 0.0 0.0 0:00 kapmd
4 root 34 19 0 0 0 SWN 0.0 0.0 0:00 ksoftirqd_CPU0
5 root 15 0 0 0 0 SW 0.0 0.0 0:00 kswapd
6 root 25 0 0 0 0 SW 0.0 0.0 0:00 bdflush
7 root 15 0 0 0 0 SW 0.0 0.0 0:00 kupdated
8 root 25 0 0 0 0 SW 0.0 0.0 0:00 mdrecoveryd
12 root 15 0 0 0 0 SW 0.0 0.0 0:00 kjournald
108 root 15 0 0 0 0 SW 0.0 0.0 0:00 khubd
233 root 15 0 0 0 0 SW 0.0 0.0 0:00 kjournald
478 root 15 0 0 0 0 SW 0.0 0.0 0:00 eth0
529 root 16 0 1048 1048 760 S 0.0 0.2 0:00 dhclient
570 root 15 0 760 760 628 S 0.0 0.1 0:00 syslogd
574 root 15 0 432 432 376 S 0.0 0.0 0:00 klogd
591 rpc 15 0 540 540 460 S 0.0 0.1 0:00 portmap
610 rpcuser 16 0 836 836 704 S 0.0 0.1 0:00 rpc.statd
718 root 17 0 1464 1464 1220 S 0.0 0.2 0:00 sshd
732 root 15 0 896 896 760 S 0.0 0.1 0:00 xinetd
746 ntp 15 0 1912 1912 1720 S 0.0 0.3 0:00 ntpd
772 root 15 0 2528 2528 1860 S 0.0 0.4 0:00 sendmail
781 smmsp 17 0 2188 2184 1660 S 0.0 0.4 0:00 sendmail
791 root 15 0 436 436 384 S 0.0 0.0 0:00 gpm
800 root 15 0 620 620 536 S 0.0 0.1 0:00 crond
833 xfs 16 0 3460 3460 880 S 0.0 0.6 0:00 xfs
852 root 18 0 536 536 484 S 0.0 0.1 0:00 rhnsd
858 root 16 0 412 412 356 S 0.0 0.0 0:00 mingetty
859 root 16 0 412 412 356 S 0.0 0.0 0:00 mingetty
860 root 16 0 412 412 356 S 0.0 0.0 0:00 mingetty
861 root 16 0 412 412 356 S 0.0 0.0 0:00 mingetty
862 root 16 0 412 412 356 S 0.0 0.0 0:00 mingetty
863 root 16 0 412 412 356 S 0.0 0.0 0:00 mingetty
864 root 15 0 2940 2940 2824 S 0.0 0.5 0:00 gdm-binary
919 root 15 0 1120 1120 972 S 0.0 0.2 0:00 startkde
976 root 15 0 996 996 800 S 0.0 0.1 0:00 ssh-agent
1021 root 15 0 7888 7888 7744 S 0.0 1.5 0:00 kdeinit
1024 root 15 0 8036 8036 7796 S 0.0 1.5 0:00 kdeinit
1027 root 15 0 9144 9144 8756 S 0.0 1.8 0:00 kdeinit
1029 root 15 0 10368 10M 9616 S 0.0 2.0 0:00 kdeinit
1034 root 15 0 11960 11M 10956 S 0.0 2.3 0:00 kdeinit
1035 root 15 0 8432 8432 8152 S 0.0 1.6 0:00 kdeinit

Nothing jumps out at me here except for the huge number of jobs. Hopefully I'm blind and someone can point to my problem.

Apollo
 
Old 03-05-2003, 01:26 PM   #6
JStew
Member
 
Registered: Oct 2002
Location: North Atlanta
Distribution: LFS
Posts: 229

Rep: Reputation: 30
I know what the problem is... you're running Redhat!!!!!

No seriously, with distros like Redhat and Mandrake you can have some insanely unnecessary services running. That will eat up some RAM. Try turning off services you know you don't need. It never hurts to turn off things like Kudzu and anything with *drake in it.
 
Old 03-05-2003, 01:45 PM   #7
Apollo77
Member
 
Registered: Feb 2003
Location: Toronto
Distribution: RH8 / FC1 / Gentoo / Debian / FreeBSD / Centos / Ubuntu
Posts: 182

Original Poster
Rep: Reputation: 35
Believe me, I AM seriously questioning if running Redhat IS my problem!

However, this doesn't help me much. There is tons of free RAM and nothing is chewing up CPU. So what can be going on here?

I'll ask again. Can anyone suggest how I can tell which process is accessing the HDD. I am betting that process is the culprit.

Apollo

BTW, not sure if crontab was a serious suggestion, but I ran crontab and got message ~ "no crontab".
 
Old 03-05-2003, 01:53 PM   #8
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Well, if you boot from a floppy and it does not do this but if you boot from the hard drive it does, that tells you its something that is either loaded at startup possibly the kernel that you have on your system from the one you might be booting from on the floppy.
The boot floppy, is this the one you created during installation ?
Have you changed anything on your system at all, maybe recompiled your kernel, startup scripts, etc ?
And how long has it done this, from first install or after the fact ?
 
Old 03-05-2003, 02:07 PM   #9
rshaw
Senior Member
 
Registered: Apr 2001
Location: Perry, Iowa
Distribution: Mepis , Debian
Posts: 2,692

Rep: Reputation: 45
have a look in /var/log/messages, any indication of what it's up to?
 
Old 03-05-2003, 04:41 PM   #10
Apollo77
Member
 
Registered: Feb 2003
Location: Toronto
Distribution: RH8 / FC1 / Gentoo / Debian / FreeBSD / Centos / Ubuntu
Posts: 182

Original Poster
Rep: Reputation: 35
This problem has existed right from first install. I almost gave up on Redhat right away, but I stumbled on booting from the floppy.

I just checked /var/log/messages. There are a lot of entries during boot and shutdown, but writing to this file essentially ends after login. I suppose I could compare entries to this file during floppy boot and during HDD boot.

Below are the entries from my last login. It started 15 minutes ago and HDD is still running. Actually the HDD runs even at the logon screen without any sessions running.

Mar 5 17:11:19 pbrai modprobe: modprobe: Can't locate module sound-slot-1
Mar 5 17:11:19 pbrai modprobe: modprobe: Can't locate module sound-service-1-0
Mar 5 17:11:19 pbrai modprobe: modprobe: Can't locate module sound-slot-1
Mar 5 17:11:19 pbrai modprobe: modprobe: Can't locate module sound-service-1-0
Mar 5 17:11:32 pbrai gconfd (root-1596): starting (version 1.2.1), pid 1596 user 'root'
Mar 5 17:11:32 pbrai gconfd (root-1596): Resolved address "xml:readonly:/etc/gconf/gconf.xml.mandatory" to a read-only config source at position 0
Mar 5 17:11:32 pbrai gconfd (root-1596): Resolved address "xml:readwrite:/root/.gconf" to a writable config source at position 1
Mar 5 17:11:32 pbrai gconfd (root-1596): Resolved address "xml:readonly:/etc/gconf/gconf.xml.defaults" to a read-only config source at position 2

Does this trigger any ideas?

I do appreciate everyone's help.

Apollo
 
Old 03-05-2003, 09:20 PM   #11
cnjohnson
Member
 
Registered: Nov 2002
Location: Nashville
Distribution: FreeBSD, Linux, OS-X
Posts: 544

Rep: Reputation: 30
It was I who suggested running crontab. As root do this:

#crontab -l

If you have events scheduled as root, this will tell you.

Second, are you booting to GNOME or KDE or someother Xwindow manager?

If you are, boot to level 3 instead.

Post the output to df. As root do

#df

Finally, if you are running the graphical interface, like GNOME, on the menu from the toolbar, find the services applet, and turn off the services you do not need.

Cheers--
Charles
 
Old 03-05-2003, 10:13 PM   #12
Rickdog
LQ Newbie
 
Registered: Feb 2003
Location: North Dakota
Distribution: Redhat 7.3, 8.0
Posts: 28

Rep: Reputation: 15
The HDD running continuously is NOT normal for Redhat or any other distro unless under some unusual load. I have run 8.0 on k6-2 500 machines while slow, they don't run the HDD excessively. My top looks like this on a XP 2100+ running RH 8.0 and only 256 MB ram. It is not running as a server or anything so processes are like a typical desktop running KDE.

9:23pm up 17 min, 3 users, load average: 0.21, 0.17, 0.10
64 processes: 60 sleeping, 4 running, 0 zombie, 0 stopped
CPU states: 4.3% user, 1.3% system, 0.0% nice, 94.2% idle
Mem: 255408K av, 200908K used, 54500K free, 0K shrd, 9088K buff
Swap: 522072K av, 0K used, 522072K free 112052K cached

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
904 root 5 -10 52940 9348 2576 S < 2.3 3.6 0:13 X
1312 root 15 0 54496 13M 11624 R 1.1 5.5 0:01 kdeinit
825 xfs 16 0 3632 3632 984 S 0.7 1.4 0:00 xfs
1288 root -51 0 4992 4992 3752 S 0.7 1.9 0:01 artsd
1342 root 15 0 22320 21M 12656 S 0.3 8.7 0:05 mozilla-bin
1341 root 15 0 1032 1032 844 R 0.1 0.4 0:01 top
1 root 15 0 476 476 424 S 0.0 0.1 0:04 init
2 root 15 0 0 0 0 SW 0.0 0.0 0:00 keventd
3 root 15 0 0 0 0 SW 0.0 0.0 0:00 kapmd
4 root 34 19 0 0 0 SWN 0.0 0.0 0:00 ksoftirqd_CPU0
5 root 15 0 0 0 0 SW 0.0 0.0 0:00 kswapd
6 root 25 0 0 0 0 SW 0.0 0.0 0:00 bdflush
7 root 15 0 0 0 0 SW 0.0 0.0 0:00 kupdated
8 root 25 0 0 0 0 SW 0.0 0.0 0:00 mdrecoveryd
12 root 15 0 0 0 0 SW 0.0 0.0 0:00 kjournald
68 root 16 0 0 0 0 SW 0.0 0.0 0:00 khubd
193 root 15 0 0 0 0 SW 0.0 0.0 0:00 kjournald
509 root 15 0 1024 1024 744 S 0.0 0.4 0:00 dhclient
569 root 15 0 540 540 460 S 0.0 0.2 0:00 syslogd
573 root 15 0 428 428 376 S 0.0 0.1 0:00 klogd
590 rpc 15 0 532 532 460 S 0.0 0.2 0:00 portmap
609 rpcuser 18 0 724 724 636 S 0.0 0.2 0:00 rpc.statd
690 root 15 0 472 472 424 S 0.0 0.1 0:00 apmd
728 root 17 0 1464 1464 1220 S 0.0 0.5 0:00 sshd
742 root 15 0 900 900 772 S 0.0 0.3 0:00 xinetd
765 root 15 0 2380 2380 1752 S 0.0 0.9 0:00 sendmail
775 smmsp 17 0 2048 2044 1556 S 0.0 0.8 0:00 sendmail
785 root 15 0 432 432 384 S 0.0 0.1 0:00 gpm
794 root 15 0 608 608 536 S 0.0 0.2 0:00 crond
834 root 35 19 572 572 492 S N 0.0 0.2 0:00 anacron
843 daemon 15 0 520 520 464 S 0.0 0.2 0:00 atd
852 root 16 0 404 404 356 S 0.0 0.1 0:00 mingetty
853 root 16 0 404 404 356 S 0.0 0.1 0:00 mingetty

Last edited by Rickdog; 03-05-2003 at 10:24 PM.
 
Old 03-05-2003, 10:21 PM   #13
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 50
run the following:

Code:
lsof | less
lsof lists open files, and the processes accessing those files,
which will tell you which processes are accessing your hard
drive. Unfortunately, it's not dynamic.
Read the man page (man lsof).
 
Old 03-05-2003, 10:37 PM   #14
Apollo77
Member
 
Registered: Feb 2003
Location: Toronto
Distribution: RH8 / FC1 / Gentoo / Debian / FreeBSD / Centos / Ubuntu
Posts: 182

Original Poster
Rep: Reputation: 35
I have solved the problem.

Nothing at all to do with linux. Hardware. Argghh. I realized this when I started comparing exactly what was happening during the floppy boot and the HDD boot. The problem seemed to start immediately after the machine chose HDD boot -- before even loading the OS.

I had HDD (master) and CD drive (slave) on IDE1. I moved CD to IDE2 and everything now works perfectly.

Sorry to put you all through that. I do appreciate your help and since I am new to Linux I learned a lot (if that's any consolation).

Thanks!
Apollo
 
Old 03-06-2003, 12:32 AM   #15
Daemonfly
Member
 
Registered: Feb 2003
Distribution: Gentoo
Posts: 63

Rep: Reputation: 15
Nice to see it was fixed, but I still don't see why having the CD-Rom slaved on the same channel as the master HD would cause such problems.

Perhaps the unidentifyable hardware anomalies associated with the wide variety of hardware available
 
  


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
Logs of accessed sites per IP in NAT jeffvph Linux - Networking 1 12-04-2005 07:35 PM
mounted volume can only be accessed by root EcceVery Debian 7 08-01-2004 08:45 AM
How To Stop HDD Powering Down? Asificare Mandriva 7 07-05-2004 02:01 PM
Tracking the accessed files EdwinNameless Linux - Software 5 07-16-2003 11:00 AM
How to stop/decrease the periodical HDD actions? telemark Linux - Newbie 2 07-04-2003 09:32 AM

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

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