Apache-Scoreboard
view release on metacpan or search on metacpan
lib/Apache/ScoreboardGraph.pm view on Meta::CPAN
bar_spacing => 2,
two_axes => 1,
x_labels_vertical => 1,
x_label_position => 1/2,
dclrs => [qw(lred lblue)],
%{ $args || {} },
);
my $bytes_str = Apache::Scoreboard::size_string($total_bytes);
$graph->set_legend("Access Count ($total_access total)",
"Bytes Served (KB) ($bytes_str total)");
($graph, $data);
}
my %Status =
(
'.' => "Open Slot",
'S' => "Starting",
'_' => "Waiting",
lib/Apache/ScoreboardGraph.pm view on Meta::CPAN
title => "$self->{host} Server CPU Usage",
long_ticks => 1,
bar_spacing => 2,
two_axes => 1,
x_labels_vertical => 1,
x_label_position => 1/2,
dclrs => [qw(lred lblue)],
%{ $args || {} },
);
$graph->set_legend("CPU ($total_cpu total)",
"Request Time (in milliseconds) ($total_req_time total)");
($graph, $data);
}
sub mem_usage {
require GTop;
my($self, $args) = @_;
my $image = $self->{image};
my $gtop_host = delete $args->{gtop_host};
my $gtop = $gtop_host ? GTop->new($gtop_host) : GTop->new;
lib/Apache/ScoreboardGraph.pm view on Meta::CPAN
title => "$gtop_host Apache Memory Usage",
y_tick_number => 8,
y_label_skip => 2,
line_width => 3,
y_number_format => sub {
sprintf "%s", GTop::size_string(KB * shift);
},
%{ $args || {} },
);
$graph->set_legend(map {
my $str = GTop::size_string($total{$_});
"$_ ($str total)";
} @mem);
($graph, $data);
}
1;
__END__
( run in 0.743 second using v1.01-cache-2.11-cpan-49f99fa48dc )