Apache-Scoreboard
view release on metacpan or search on metacpan
Scoreboard.xs view on Meta::CPAN
if (ap_exists_scoreboard_image()) {
image->sb = ap_scoreboard_image;
image->pool = pool;
ap_mpm_query(AP_MPMQ_HARD_LIMIT_DAEMONS, &(image->server_limit));
ap_mpm_query(AP_MPMQ_HARD_LIMIT_THREADS, &(image->thread_limit));
}
else {
Perl_croak(aTHX_ "ap_scoreboard_image doesn't exist");
}
RETVAL = sv_setref_pv(NEWSV(0, 0), "Apache::Scoreboard", (void*)image);
/* make sure the pool sticks around as long as this object is alive */
mpxs_add_pool_magic(RETVAL, pool_sv);
CLASS = CLASS; /* avoid warnings */
OUTPUT:
RETVAL
int
server_limit(image)
lib/Apache/Scoreboard.pm view on Meta::CPAN
$status = $worker_score->status();
This method returns the status of the given worker as a
dual-variable. In the string context it gives a single letter, which
can be mapped to the long description via the following list
"_" Waiting for Connection
"S" Starting up
"R" Reading Request
"W" Sending Reply
"K" Keepalive (read)
"D" DNS Lookup
"C" Closing connection
"L" Logging
"G" Gracefully finishing
"I" Idle cleanup of worker
"." Open slot with no current process
In the numerical context it returns the numerical status (which
corresponds to a C define like SERVER_DEAD, SERVER_READY, etc) for
which we don't really have the use at the moment. You should use the
lib/Apache/ScoreboardGraph.pm view on Meta::CPAN
($graph, $data);
}
my %Status =
(
'.' => "Open Slot",
'S' => "Starting",
'_' => "Waiting",
'R' => "Reading",
'W' => "Writing",
'K' => "Keepalive",
'L' => "Logging",
'D' => "DNS Lookup",
'G' => "Finishing",
);
sub status {
my($self, $args) = @_;
my $image = $self->{image};
my %data = ();
my @labels = values %Status;
( run in 0.934 second using v1.01-cache-2.11-cpan-39bf76dae61 )