Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
tool for monitoring file/disk io
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
stef
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jul 2003
Posts: 93

PostPosted: Mon Feb 20, 2006 6:18 pm    Post subject: tool for monitoring file/disk io Reply with quote

For some time now I noticed that my hdd-led lights up every one or two seconds even if I don't have anything running that might me using the disk. (i guess)

So now i wonder if there is a tool to monitor processes that access files / disk (like "top" for watching the cpu/ram usage)

iostat only tells me how many bytes are read/written but not which process did do this.
Back to top
View user's profile Send private message
Abraxa
Apprentice
Apprentice


Joined: 14 Jun 2005
Posts: 172
Location: Germany

PostPosted: Tue Feb 21, 2006 2:26 am    Post subject: Reply with quote

Maybe fuser might be of help for you, though you'd probably have to write a little script to get the process names from the PIDs.

Greetings,
-Soeren
Back to top
View user's profile Send private message
stef
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jul 2003
Posts: 93

PostPosted: Tue Feb 21, 2006 10:53 am    Post subject: Reply with quote

right, but doesn't fuser only tell me what files are opened at all?

... what i would need is something that tells / logs something like: process <..> just now wrote/read to/from file <..>
Back to top
View user's profile Send private message
JeliJami
Veteran
Veteran


Joined: 17 Jan 2006
Posts: 1086
Location: Belgium

PostPosted: Tue Feb 21, 2006 7:57 pm    Post subject: Reply with quote

I've had these same symptoms a while ago, but I can't remember what exactly caused it.

It was some service that was active, famd perhaps.
_________________
Unanswered Post Initiative | Search | FAQ
Former username: davjel
Back to top
View user's profile Send private message
stef
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jul 2003
Posts: 93

PostPosted: Sat Mar 18, 2006 1:30 pm    Post subject: Reply with quote

actually i guess something like that ... but as i can't figure out what it is, I'd like to have a tool that tells me "hey, just now process xy wrote to the disk" to find the process thats causing the io.
... anyone?
Back to top
View user's profile Send private message
JeliJami
Veteran
Veteran


Joined: 17 Jan 2006
Posts: 1086
Location: Belgium

PostPosted: Sun Mar 19, 2006 6:05 am    Post subject: Reply with quote

you can try a process of elimination

i suggest to first stop the famd, if at al running

then perhaps your graphical environment: exit Gnome, KDE, XFCE, whatever you're using
and run
Code:
# /etc/init.d/xdm stop


and try to stop services one at a time to see when disk access stops
killing a process may not be sufficient, as some services just respawn when killed

it may sound like a lenghty procedure, but i guess you'll find it faster this way than waiting for the tool you described
_________________
Unanswered Post Initiative | Search | FAQ
Former username: davjel
Back to top
View user's profile Send private message
Pandor
Tux's lil' helper
Tux's lil' helper


Joined: 16 Nov 2005
Posts: 128
Location: Belgium

PostPosted: Sun Mar 19, 2006 1:17 pm    Post subject: Reply with quote

maybe you could try lsof (list open files).
it will tell you all open files including the process/user that's using it.
Back to top
View user's profile Send private message
stef
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jul 2003
Posts: 93

PostPosted: Thu Mar 23, 2006 11:10 am    Post subject: Reply with quote

actually I already started the thing with cutting down the number of processes by stopping services and of course X but ... that didn't help much as it sometimes fooled me that I thought ok, now I got it - no more disc access ... but after starting that again there sometimes still was no disc access ... (ok that would point to a problem with that service occouring only after some running time / special events / ...) but ... when i started everything again and continued with work ... I found disc accesses again .. so now -thinking I found the bad proccess- I stop that process and :/ still disc access ... so I'm lost :P)
Therefore I decided not to take that lengthy procedure of continuing trail and error and ask for a tool (even if I'd have to wait some days for a answer ;))

lsof sounds good, but does not help in monitoring for access (only tells me what files are open at all ... or maybe there's a tool to combine with the output of lsof that monitors access to a given file?)
Back to top
View user's profile Send private message
avendesora
Veteran
Veteran


Joined: 16 Aug 2002
Posts: 1739
Location: Betelgeuse vicinity

PostPosted: Thu Mar 23, 2006 12:12 pm    Post subject: Reply with quote

It could simply the kernel vm doing its thing (i.e. flushing dirty pages to disk every so often).
Try settings /proc/sys/vm/dirty_writeback_centisecs to something larger, and see if that changes
the frequency of your disk writes. If it does, then you could set it to some very high value.

Warning: unflushed dirty pages are data that's been modified in ram but not written to disk yet.
Loosing power with a lot of unflushed pages means loosing a lot of work, so be careful with this
kind of thing. You'll find plenty on that /proc entry on goole. Try looking for laptop-mode too.
Back to top
View user's profile Send private message
stef
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jul 2003
Posts: 93

PostPosted: Fri Mar 24, 2006 6:01 pm    Post subject: Reply with quote

Hm, yes interesting point ... but well, I want dirty pages to be flushed (to be sure, not to loose data)
so ... shouldn't at some point all dirty pages be written? Then the question rises, where do all those dirty pages come from even if nearly no disc intensive service is running :p
Back to top
View user's profile Send private message
avendesora
Veteran
Veteran


Joined: 16 Aug 2002
Posts: 1739
Location: Betelgeuse vicinity

PostPosted: Sat Mar 25, 2006 7:55 am    Post subject: Reply with quote

Type "free". You'll see you always have some cached data. Anything that uses that can produce
"dirty" pages.
But it doesn't necessarily have to be that. Could be your syslog daemon sync'ing its files or something.
That's why you should look for laptop-mode on google: plenty of other tips/tricks available.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum