man Apache2::Status () - Embedded interpreter status information

NAME

Apache2::Status - Embedded interpreter status information

Synopsis

  <Location /perl-status>
      SetHandler modperl
      PerlOptions +GlobalRequest
      PerlResponseHandler Apache2::Status
  </Location>

  or

  <Location /perl-status>
      SetHandler perl-script
      PerlResponseHandler Apache2::Status
  </Location>

Description

The CWApache2::Status module provides some information about the status of the Perl interpreter embedded in the server.

Configure like so:

  <Location /perl-status>
      SetHandler modperl
      PerlOptions +GlobalRequest
      PerlResponseHandler Apache2::Status
  </Location>

Notice that under the CWmodperl core handler the Environment menu option will show only the environment under that handler. To see the environment seen by handlers running under the CWperl-script core handler, configure CWApache2::Status as:

  <Location /perl-status>
      SetHandler perl-script
      PerlResponseHandler Apache2::Status
  </Location>

Other modules can plugin a menu item like so:

  require Apache2::Module;
  Apache2::Status->menu_item(
      'DBI' => "DBI connections", #item for Apache::DBI module
      sub {
          my ($r, $q) = @_; #request and CGI objects
          my (@strings);
          push @strings,  "blobs of html";
          return \@strings;     #return an array ref
      }
  ) if Apache2::Module::loaded('Apache2::Status');

WARNING: CWApache2::Status must be loaded before these modules via the CWPerlModule or CWPerlRequire directives (or from startup.pl).

A very common setup might be: Perl Module B::TerseSize

  <Location /perl-status>
      SetHandler perl-script
      PerlResponseHandler Apache2::Status
      PerlSetVar StatusOptionsAll On
      PerlSetVar StatusDeparseOptions "-p -sC"
  </Location>

due to the implementation of Apache2::Status::noh_fileline in B::TerseSize, you must load B::TerseSize first.

Options

This single directive will enable all of the options described below.

  PerlSetVar StatusOptionsAll On
When browsing symbol tables, the values of arrays, hashes and scalars can be viewed via CWData::Dumper if this configuration variable is set to CWOn:

  PerlSetVar StatusDumper On
With this option CWOn and the CWApache::Peek module installed, functions and variables can be viewed ala CWDevel::Peek style:

  PerlSetVar StatusPeek On
With this option CWOn and the CWB::LexInfo module installed, subroutine lexical variable information can be viewed.

  PerlSetVar StatusLexInfo On
With this option CWOn subroutines can be deparsed.

  PerlSetVar StatusDeparse On

Options can be passed to CWB::Deparse::new like so:

  PerlSetVar StatusDeparseOptions "-p -sC"

See the CWB::Deparse manpage for details. With this option CWOn, text-based op tree graphs of subroutines can be displayed, thanks to CWB::Terse.

  PerlSetVar StatusTerse On
With this option CWOn and the CWB::TerseSize module installed, text-based op tree graphs of subroutines and their size can be displayed. See the CWB::TerseSize docs for more info.

  PerlSetVar StatusTerseSize On
With this option CWOn and the CWB::TerseSize module installed, a Memory Usage will be added to the CWApache2::Status main menu. This option is disabled by default, as it can be rather cpu intensive to summarize memory usage for the entire server. It is strongly suggested that this option only be used with a development server running in CW-X mode, as the results will be cached.

  PerlSetVar StatusTerseSizeMainSummary On
When CWStatusDumper is enabled, another link OP Tree Graph will be present with the dump if this configuration variable is set to CWOn:

  PerlSetVar StatusGraph

This requires the B module (part of the Perl compiler kit) and CWB::Graph (version 0.03 or higher) module to be installed along with the CWdot program.

Dot is part of the graph visualization toolkit from AT&T: http://www.graphviz.org/.

WARNING: Some graphs may produce very large images, some graphs may produce no image if CWB::Graph's output is incorrect. Location of the dot program for CWStatusGraph, if other than /usr/bin or /usr/local/bin Directory where CWStatusGraph should write it's temporary image files. Default is CW$ServerRoot/logs/b_graphs.

Prerequisites

The CWDevel::Symdump module, version CW2.00 or higher.

Other optional functionality requirements: CWB::Deparse - 0.59, CWB::Fathom - 0.05, CWCWB::GraphCW - 0.03.

Copyright

mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0.

See Also

perl(1), Apache(3), Devel::Symdump(3), Data::Dumper(3), B(3), CWB::Graph(3), mod_perl 2.0 documentation.

Authors

Doug MacEachern with contributions from Stas Bekman