> On Wed, Feb 14, 2007 at 12:26:19PM -0000, Kenn Humborg wrote:
> > Running vmstat 1 on a machine shows me a certain amount of block I/O.
> > But, short of strace-ing everything running on the machine, how can
> > I determine which processes are generating this I/O?
> > lsof will show me open files, but that doesn't help much.
>> To get a better grip of what your processes are doing over time, it
> may be useful to use a combination of sar and top. sar is a part of
> the sysstat package (which also includes iostat which you might like).
> You can use sar to collect per-process statistics by using the -x
> option as follows:
>> sar -x ALL 1 1000 > sar-stats.txt
>> This will collect stats each second for 1000 seconds. The output is
> ordered by PID which is useful since you can just check the bottom
> of each list to see what new processes are doing. Unfortunatly the
> output doesn't give process names, but that's okay because top does.
Thanks. I'll give this a shot next time.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!