Re: I/O accounting for all processes?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 16, 2010 at 12:16 PM, Jakov Sosic <jakov.sosic@xxxxxxx> wrote:
On 06/16/2010 06:49 AM, Scott Gifford wrote:
> On Tue, Jun 15, 2010 at 5:33 PM, Jakov Sosic <jakov.sosic@xxxxxxx
> <mailto:jakov.sosic@xxxxxxx>> wrote:
>
>     I'm interested in measuring I/O that all apache processes are
>     generating.
>
>
> I used mod_logio to solve a similar problem not too long ago, with good
> success:

But it seems that this module records network I/O and not the filesystem
I/O. Although it's good to know this too, I would prefer more the
filesystem I/O currently :)

Ah, I see.  I haven't done that before, but I can offer random suggestions.  :-)

You probably know this already, but if Apache is the main or only thing running on this server, tools like iostat and sar can get the information you are after on a system-wide basis.  That would be by far the easiest solution.

Otherwise, if you need to isolate Apache from other parts of the system, it looks like the information you are after is in /proc/PID/io on Linux.  You could find all of Apache's PIDs, poll this information periodically, log it, then calculate usage/second over your log interval.  Tools like mrtg are designed to manage this sort of data.  iotop might be helpful too.  You could probably also install some custom request handlers from a module or mod_perl (in a PerlLogHandler or PerlCleanupHandler) to read this file and record the I/O increase after every request.  This might help work around your concern about PIDs changing.

Those are the places I would start at least.  Hope this is helpful,

-----Scott.


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux