httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Gifford <sgiff...@suspectclass.com>
Subject Re: [users@httpd] I/O accounting for all processes?
Date Wed, 16 Jun 2010 20:25:03 GMT
On Wed, Jun 16, 2010 at 12:16 PM, Jakov Sosic <jakov.sosic@srce.hr> wrote:

> On 06/16/2010 06:49 AM, Scott Gifford wrote:
> > On Tue, Jun 15, 2010 at 5:33 PM, Jakov Sosic <jakov.sosic@srce.hr
> > <mailto:jakov.sosic@srce.hr>> 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<http://perl.apache.org/docs/2.0/user/handlers/http.html#PerlLogHandler>or
PerlCleanupHandler<http://perl.apache.org/docs/2.0/user/handlers/http.html#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.

Mime
View raw message