NAME
Net::Tomcat::Connector::Scoreboard - Utility class for representing abstract Tomcat Connector scoreboard objects.
VERSION
Version 0.01
SYNOPSIS
A Net::Tomcat::Connector::Scoreboard object is an abstract collection of Net::Tomcat::Connector::Scoreboard::Entry objects. This class exists to provide higher level functions and syntactic sugar for accessing the aforementioned objects.
use Net::Tomcat;
# Create a new Net::Tomcat object
my $tc = Net::Tomcat->new(
username => 'admin',
password => 'password',
hostname => 'web-server-01.company.com'
)
or die "Unable to create new Net::Tomcat object: $!\n";
# Retrieve a Net::Tomcat::Connector::Scoreboard object by explicit
# connector name
my $sb = $tc->connector('http-8080')->scoreboard;
# Extract or apply an interesting function to each of our
# scoreboard threads (requests).
my @threads_for_vhost = $sb->threads_for_vhost('myvhost');
# Print out a graphical representation of the scoreboard.
$sb->pretty_print;
# Or, using the overloaded stringification
print $sb;
METHODS
new
Constructor - creates a new Net::Tomcat::Connector::Statistics object. Note that you should not normally need to call the constructor method directly as a Net::Tomcat::Connector::Statistics object will be created for you on invoking methods in parent classes.
threads
Returns an array of Net::Tomcat::Connector::Scoreboard::Entry objects where each object represents a thread currently being serviced by the connector.
thread_count
Returns the number of threads currently being services by the connector.
threads_ready
Returns the number of threads currently in a ready state.
threads_service
Returns the number of threads currently servicing a request.
threads_parse
Returns the number of threads currently in a parsing state.
threads_keepalive
Returns the number of threads currently in a keepalive state.
threads_finish
Returns the number of threads currently in a finish state.
threads_for_client ( $CLIENT )
# Returns all threads for the client 10.80.8.8 on connector 'http-8080'
my @threads = $tc->connector('http-8080')->scoreboard->threads_for_client( '10.80.8.8' );
Returns an array of Net::Tomcat::Connector::Scoreboard::Entry objects where each object represents a current thread servicing the client identified by the value of the $CLIENT parameter (usually an IP address).
threads_for_vhost ( $VHOST )
# Return all threads for the virtual host 'www-4.company.com'
my @threads = $tc->connector('http-8080')->scoreboard->threads_for_vhost( 'www-4.company.com' );
Returns an array of Net::Tomcat::Connector::Scoreboard::Entry objects for the virtual host (vhost) as defined by the value of the $VHOST parameter.
pretty_print
Prints an ascii representation of the scoreboard to standard out.
Note that this module also stringifies to this method.
AUTHOR
Luke Poskitt, <ltp at cpan.org>
BUGS
Please report any bugs or feature requests to bug-net-tomcat-connector-statistics at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-Tomcat-Connector-Statistics. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. __END__
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Net::Tomcat::Connector::Scoreboard
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-Tomcat-Connector-Scoreboard
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
http://cpanratings.perl.org/d/Net-Tomcat-Connector-Scoreboard
Search CPAN
http://search.cpan.org/dist/Net-Tomcat-Connector-Scoreboard/
ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
Copyright 2015 Luke Poskitt.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.