Apache2::ShowStatus - if you want to know what your Apache processes are doing


Apache2-ShowStatus documentation Contained in the Apache2-ShowStatus distribution.

Index


Code Index:

NAME

Top

Apache2::ShowStatus - if you want to know what your Apache processes are doing

SYNOPSIS

Top

 LoadModule perl_module ".../mod_perl.so"
 PerlModule Apache2::ShowStatus
 PerlInitHandler Apache2::ShowStatus

DESCRIPTION

Top

This module provides a PerlInitHandler that sets the apache's process title to

 "httpd: ".$r->the_request

The process title is automagically reset when the request is over.

Thus, top & Co shows what requests are currently active.

SEE ALSO

Top

Sys::Proctitle

AUTHOR

Top

Torsten Foertsch, <torsten.foertsch@gmx.net>

COPYRIGHT AND LICENSE

Top


Apache2-ShowStatus documentation Contained in the Apache2-ShowStatus distribution.

package Apache2::ShowStatus;

use 5.008;
use strict;
use warnings;
no warnings qw(uninitialized);

use Sys::Proctitle ();
use Apache2::RequestRec ();
use Apache2::RequestUtil ();
use Apache2::Const -compile => qw(DECLINED);

our $VERSION = '0.02';

sub handler {
  my $r=shift;

  $r->pnotes( 'ProctitleObject'=>
	      Sys::Proctitle->new( 'httpd: '.$r->the_request ) );

  return Apache2::Const::DECLINED;
}

1;

__END__