Net::Tomcat::Connector::Scoreboard - Utility class for representing abstract Tomcat Connector scoreboard objects.
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;
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.
Returns an array of Net::Tomcat::Connector::Scoreboard::Entry objects where each object represents a thread currently being serviced by the connector.
Returns the number of threads currently being services by the connector.
Returns the number of threads currently in a ready state.
Returns the number of threads currently servicing a request.
Returns the number of threads currently in a parsing state.
Returns the number of threads currently in a keepalive state.
Returns the number of threads currently in a finish state.
# 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).
# 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.
Prints an ascii representation of the scoreboard to standard out.
Note that this module also stringifies to this method.
Luke Poskitt, <ltp at cpan.org>
<ltp at cpan.org>
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__
bug-net-tomcat-connector-statistics at rt.cpan.org
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
http://annocpan.org/dist/Net-Tomcat-Connector-Scoreboard
CPAN Ratings
http://cpanratings.perl.org/d/Net-Tomcat-Connector-Scoreboard
Search CPAN
http://search.cpan.org/dist/Net-Tomcat-Connector-Scoreboard/
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.
To install Net::Tomcat, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Tomcat
CPAN shell
perl -MCPAN -e shell install Net::Tomcat
For more information on module installation, please visit the detailed CPAN module installation guide.