Beekeeper::Service::Supervisor - Worker pool supervisor
Version 0.09
my $status = Beekeeper::Service::Supervisor->get_services_status( host => '.*', pool => '.*', pool => '.*', ); print "$_: $status->{$_}->{load}\n" foreach keys %$status; Beekeeper::Service::Supervisor->get_services_status( on_success => sub { my ($status) = @_; print "$_: $status->{$_}->{load}\n" foreach keys %$status; }, on_error => sub { my ($error) = @_; die $error->message; }, );
A Supervisor worker is created automatically in every worker pool.
It keeps a shared table of the performance metrics of every worker connected to every broker, and routinely measures the CPU and memory usage of local workers.
These metrics can be queried using the methods provided by this module or using the command line client bkpr-top.
Number of received notifications per second.
Number of processed calls per second.
Number of errors per second generated while handling calls or notifications.
Resident non shared memory size in KiB. This is roughly equivalent to the value of RES minus SHR displayed by top.
RES
SHR
top
Percentage of CPU load (100 indicates a full utilization of one core thread).
Percentage of busy time (100 indicates no idle time).
Note that workers can have a high load with very little CPU usage when being blocked by synchronous operations (like slow SQL queries, for example).
Due to inaccuracies of measurement the actual maximum may be slightly below 100.
Returns the aggregate performance metrics of all active services.
Services can be filtered by host, pool and class.
host
pool
class
Returns the individual performance metrics of every worker of all active services.
Asynchronous version of get_services_status method.
get_services_status
Callbacks on_success and on_error must be coderefs and will receive respectively Beekeeper::JSONRPC::Response and Beekeeper::JSONRPC::Error objects as arguments.
on_success
on_error
Asynchronous version of get_workers_status method.
get_workers_status
bkpr-top, bkpr-restart, Beekeeper::Service::Supervisor::Worker.
José Micó, jose.mico@gmail.com
jose.mico@gmail.com
Copyright 2015-2021 José Micó.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language itself.
This software is distributed in the hope that it will be useful, but it is provided “as is” and without any express or implied warranties. For details, see the full text of the license in the file LICENSE.
To install Beekeeper, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Beekeeper
CPAN shell
perl -MCPAN -e shell install Beekeeper
For more information on module installation, please visit the detailed CPAN module installation guide.