LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 06-24-2008, 11:49 AM   #1
silkstone
LQ Newbie
 
Registered: Jun 2008
Location: Yorkshire, UK
Distribution: Ubuntu 8.04
Posts: 27

Rep: Reputation: 16
Disk access every few seconds when idle


Running Ubuntu Hardy on a desktop PC, the HD is being accessed every few seconds - light comes on and I can hear the drive working. It's only for a brief moment and nothing shows as running in the System Monitor.

Any ideas please?
 
Old 06-24-2008, 01:05 PM   #2
Pearlseattle
Member
 
Registered: Aug 2007
Location: Switzerland
Distribution: Gentoo
Posts: 716

Rep: Reputation: 81
Hi
There might be a lot of reasons why your HDD is accessed so frequently.
The best thing you could do is to have a look at 5. Disk Power Management and monitor your system for a while.
Hope this helps
 
Old 06-24-2008, 01:09 PM   #3
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,589

Rep: Reputation: 187Reputation: 187
This disk activity could be some housekeeping on the swap partition. Use the swapon command to see if you have any swap activity during these otherwise idle periods:

swapon -s

-----------------
Steve Stites
 
Old 06-24-2008, 02:13 PM   #4
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 54
Quote:
Originally Posted by silkstone View Post
Running Ubuntu Hardy on a desktop PC, the HD is being accessed every few seconds - light comes on and I can hear the drive working. It's only for a brief moment and nothing shows as running in the System Monitor.

Any ideas please?
Posix-compliant filesystems update the atime stamp which requires a write for every read. Journaling filesystems write records to disk as well. What type of filesystems are you using [try the mount command to see] and also have a look at the output of ps -ax and top to see what's running on your system. I believe certain filesystems are known to write to disk every few seconds.

Last edited by Randux; 06-24-2008 at 02:14 PM.
 
Old 06-24-2008, 02:39 PM   #5
silkstone
LQ Newbie
 
Registered: Jun 2008
Location: Yorkshire, UK
Distribution: Ubuntu 8.04
Posts: 27

Original Poster
Rep: Reputation: 16
Thanks folks - I'll take a look at those. The filesystem is EXT3.
 
Old 06-24-2008, 03:55 PM   #6
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 3,919

Rep: Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778
Have a look at the system log files. I did have a case once where a 'bad' dhcp config was causing a '...not found' error message to be written every five or ten seconds. (I kind of got the idea that it was never going to be found after the first few days, or so.)

This is also in danger of causing logfiles to grow, so its as well to know about it.
 
Old 06-24-2008, 07:48 PM   #7
silkstone
LQ Newbie
 
Registered: Jun 2008
Location: Yorkshire, UK
Distribution: Ubuntu 8.04
Posts: 27

Original Poster
Rep: Reputation: 16
Thanks salasi. How do I check this, where do I look, and what do I do?

Apologies for my lack of knowledge.
 
Old 06-25-2008, 04:24 AM   #8
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 3,919

Rep: Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778
Quote:
Originally Posted by silkstone View Post
How do I check this, where do I look, and what do I do?
The easiest way (if you have it installed, which I doesn't seem to be the default these days, although previously it was, with kde at least) is if you have Ksyslog installed (& as its about 30 seconds work with a decent net connection, it is probably worth installing anyway, even with Gnome). There is a Gnome log viewer program, but I'm not sure about its name - something involving 'log' and 'viewer' probably.

If you don't want to go down that route, the logs themselves are generally called /var/log/something_or_another (the advantage of a dedicated program is it knows the names and paths for the right places to look). You could look at these with 'less' or you could 'tail' them to keep a continuous watch on something.

'dmesg' is worth a quick look, too.
 
Old 06-25-2008, 05:14 AM   #9
silkstone
LQ Newbie
 
Registered: Jun 2008
Location: Yorkshire, UK
Distribution: Ubuntu 8.04
Posts: 27

Original Poster
Rep: Reputation: 16
Thanks. I've looked through some log files, and kern.log has hundreds of entries like this...

Code:
Jun 25 10:10:05 silkstone-desktop2 kernel: [ 1390.904179] hub 5-0:1.0: over-current change on port 1
Jun 25 10:10:06 silkstone-desktop2 kernel: [ 1391.894623] hub 5-0:1.0: over-current change on port 1
Jun 25 10:10:07 silkstone-desktop2 kernel: [ 1392.885052] hub 5-0:1.0: over-current change on port 1
Jun 25 10:10:08 silkstone-desktop2 kernel: [ 1393.875491] hub 5-0:1.0: over-current change on port 1
Jun 25 10:10:10 silkstone-desktop2 kernel: [ 1395.113538] hub 4-0:1.0: over-current change on port 1
Jun 25 10:10:10 silkstone-desktop2 kernel: [ 1396.103993] hub 5-0:1.0: over-current change on port 1
Jun 25 10:10:11 silkstone-desktop2 kernel: [ 1397.094425] hub 4-0:1.0: over-current change on port 1
Jun 25 10:10:12 silkstone-desktop2 kernel: [ 1398.084866] hub 5-0:1.0: over-current change on port 1
Jun 25 10:10:13 silkstone-desktop2 kernel: [ 1399.075298] hub 4-0:1.0: over-current change on port 1
Jun 25 10:10:15 silkstone-desktop2 kernel: [ 1400.313341] hub 5-0:1.0: over-current change on port 1
Jun 25 10:10:16 silkstone-desktop2 kernel: [ 1401.303782] hub 4-0:1.0: over-current change on port 1
Jun 25 10:10:17 silkstone-desktop2 kernel: [ 1402.295187] hub 4-0:1.0: over-current change on port 1
Jun 25 10:10:18 silkstone-desktop2 kernel: [ 1403.284645] hub 4-0:1.0: over-current change on port 1
Jun 25 10:10:19 silkstone-desktop2 kernel: [ 1404.275069] hub 4-0:1.0: over-current change on port 1
Jun 25 10:10:20 silkstone-desktop2 kernel: [ 1405.265506] hub 5-0:1.0: over-current change on port 1
Jun 25 10:10:21 silkstone-desktop2 kernel: [ 1406.255940] hub 4-0:1.0: over-current change on port 1
Jun 25 10:10:22 silkstone-desktop2 kernel: [ 1407.246375] hub 4-0:1.0: over-current change on port 1
Jun 25 10:10:23 silkstone-desktop2 kernel: [ 1408.236815] hub 5-0:1.0: over-current change on port 1
... and is updating every second as you can see.

Any ideas what this could be? I have recently installed a card reader and also a 4-port USB PCI card.
 
Old 06-25-2008, 08:38 AM   #10
silkstone
LQ Newbie
 
Registered: Jun 2008
Location: Yorkshire, UK
Distribution: Ubuntu 8.04
Posts: 27

Original Poster
Rep: Reputation: 16
Solved it - it was the card reader. I've disconnected and removed this, and kern.log is no longer updating all the time. I'll just go back to using an external card reader.

Thanks salasi for suggesting the log files.
 
Old 06-25-2008, 10:40 AM   #11
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 54
Quote:
Originally Posted by silkstone View Post
Thanks folks - I'll take a look at those. The filesystem is EXT3.
Then you can also consider adding noatime to the mount options in fstab. It will reduce disk thrashing. See other posts on the topic- search for noatime.

Cheers,
Rand
 
Old 06-25-2008, 11:01 AM   #12
silkstone
LQ Newbie
 
Registered: Jun 2008
Location: Yorkshire, UK
Distribution: Ubuntu 8.04
Posts: 27

Original Poster
Rep: Reputation: 16
Thanks Rand, but I think that Ubuntu 8.04 now uses relatime instead of atime, and this is supposed to write out just once a week.
 
Old 06-28-2008, 03:08 PM   #13
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 54
It doesn't write out once a week That would be a truly worthless miracle especially if you didn't use your Linux that week!

relatime just writes atime for modified filesystems. Either one is probably fine but if you think atime is irrelevant then noatime is more meaningful than relatime. If you have problems with noatime, try relatime.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
saving files on local disk in VIM/EMACS taking 5+ seconds hedpe Linux - Software 9 01-08-2008 05:19 PM
Process=idle --last access knockout_artist Linux - Newbie 1 11-09-2007 06:53 PM
POP port 110 question! 30 seconds to access!!! HELP!!! pml99 Linux - General 2 02-12-2005 09:51 AM
Disk output every five seconds mikewelter Fedora 2 01-13-2005 10:07 AM
KDE access hard disk every 3 seconds Kocil Linux - Newbie 2 05-14-2003 10:33 PM


All times are GMT -5. The time now is 04:29 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration