1docs::api::Apache2::StaUtsuesr(3C)ontributed Perl Documednotcast:i:oanpi::Apache2::Status(3)
2
3
4

NAME

6       Apache2::Status - Embedded interpreter status information
7

Synopsis

9         <Location /perl-status>
10
11             # disallow public access
12             Order Deny, Allow
13             Deny from all
14             Allow from 127.0.0.1
15
16             SetHandler modperl
17             PerlOptions +GlobalRequest
18             PerlResponseHandler Apache2::Status
19         </Location>
20
21         or
22
23         <Location /perl-status>
24
25             # disallow public access
26             Order Deny, Allow
27             Deny from all
28             Allow from 127.0.0.1
29
30             SetHandler perl-script
31             PerlResponseHandler Apache2::Status
32         </Location>
33

Description

35       The "Apache2::Status" module provides some information about the status
36       of the Perl interpreter embedded in the server.
37
38       Configure like so:
39
40         <Location /perl-status>
41
42             # disallow public access
43             Order Deny, Allow
44             Deny from all
45             Allow from 127.0.0.1
46
47             SetHandler modperl
48             PerlOptions +GlobalRequest
49             PerlResponseHandler Apache2::Status
50         </Location>
51
52       Notice that under the "modperl" core handler the Environment menu
53       option will show only the environment under that handler. To see the
54       environment seen by handlers running under the "perl-script" core
55       handler, configure "Apache2::Status" as:
56
57         <Location /perl-status>
58
59             # disallow public access
60             Order Deny, Allow
61             Deny from all
62             Allow from 127.0.0.1
63
64             SetHandler perl-script
65             PerlResponseHandler Apache2::Status
66         </Location>
67
68       Other modules can "plugin" a menu item like so:
69
70         require Apache2::Module;
71         Apache2::Status->menu_item(
72             'DBI' => "DBI connections", #item for Apache::DBI module
73             sub {
74                 my ($r, $q) = @_; #request and CGI objects
75                 my (@strings);
76                 push @strings,  "blobs of html";
77                 return \@strings;     #return an array ref
78             }
79         ) if Apache2::Module::loaded('Apache2::Status');
80
81       WARNING: "Apache2::Status" must be loaded before these modules via the
82       "PerlModule" or "PerlRequire" directives (or from startup.pl).
83
84       A very common setup might be:
85         Perl Module B::TerseSize
86
87         <Location /perl-status>
88             SetHandler perl-script
89             PerlResponseHandler Apache2::Status
90             PerlSetVar StatusOptionsAll On
91             PerlSetVar StatusDeparseOptions "-p -sC"
92         </Location>
93
94       due to the implementation of Apache2::Status::noh_fileline in
95       B::TerseSize, you must load B::TerseSize first.
96

Options

98   "StatusOptionsAll"
99       This single directive will enable all of the options described below.
100
101         PerlSetVar StatusOptionsAll On
102
103   "StatusDumper"
104       When browsing symbol tables, the values of arrays, hashes and scalars
105       can be viewed via "Data::Dumper" if this configuration variable is set
106       to "On":
107
108         PerlSetVar StatusDumper On
109
110   "StatusPeek"
111       With this option "On" and the "Apache::Peek" module installed,
112       functions and variables can be viewed ala "Devel::Peek" style:
113
114         PerlSetVar StatusPeek On
115
116   "StatusLexInfo"
117       With this option "On" and the "B::LexInfo" module installed, subroutine
118       lexical variable information can be viewed.
119
120         PerlSetVar StatusLexInfo On
121
122   "StatusDeparse"
123       With this option "On" subroutines can be "deparsed".
124
125         PerlSetVar StatusDeparse On
126
127       Options can be passed to "B::Deparse::new" like so:
128
129         PerlSetVar StatusDeparseOptions "-p -sC"
130
131       See the "B::Deparse" manpage for details.
132
133   "StatusTerse"
134       With this option "On", text-based op tree graphs of subroutines can be
135       displayed, thanks to "B::Terse".
136
137         PerlSetVar StatusTerse On
138
139   "StatusTerseSize"
140       With this option "On" and the "B::TerseSize" module installed, text-
141       based op tree graphs of subroutines and their size can be displayed.
142       See the "B::TerseSize" docs for more info.
143
144         PerlSetVar StatusTerseSize On
145
146   "StatusTerseSizeMainSummary"
147       With this option "On" and the "B::TerseSize" module installed, a
148       "Memory Usage" will be added to the "Apache2::Status" main menu.  This
149       option is disabled by default, as it can be rather cpu intensive to
150       summarize memory usage for the entire server.  It is strongly suggested
151       that this option only be used with a development server running in "-X"
152       mode, as the results will be cached.
153
154         PerlSetVar StatusTerseSizeMainSummary On
155
156   "StatusGraph"
157       When "StatusDumper" is enabled, another link "OP Tree Graph" will be
158       present with the dump if this configuration variable is set to "On":
159
160         PerlSetVar StatusGraph
161
162       This requires the B module (part of the Perl compiler kit) and
163       "B::Graph" (version 0.03 or higher) module to be installed along with
164       the "dot" program.
165
166       Dot is part of the graph visualization toolkit from AT&T:
167       http://www.graphviz.org/.
168
169       WARNING: Some graphs may produce very large images, some graphs may
170       produce no image if "B::Graph"'s output is incorrect.
171
172   "Dot"
173       Location of the dot program for "StatusGraph", if other than /usr/bin
174       or /usr/local/bin
175
176   "GraphDir"
177       Directory where "StatusGraph" should write it's temporary image files.
178       Default is "$ServerRoot/logs/b_graphs".
179

Prerequisites

181       The "Devel::Symdump" module, version 2.00 or higher.
182
183       Other optional functionality requirements: "B::Deparse" - 0.59,
184       "B::Fathom" - 0.05, ""B::Graph"" - 0.03.
185
187       mod_perl 2.0 and its core modules are copyrighted under The Apache
188       Software License, Version 2.0.
189

See Also

191       perl(1), Apache(3), Devel::Symdump(3), Data::Dumper(3), B(3),
192       "B::Graph"(3), mod_perl 2.0 documentation.
193

Authors

195       Doug MacEachern with contributions from Stas Bekman
196
197
198
199perl v5.36.0                      2022-07-21     docs::api::Apache2::Status(3)
Impressum