NAME

Gearman::Driver::Console - Management console

SYNOPSIS

$ ~/Gearman-Driver$ ./examples/driver.pl --console_port 12345 &
[1] 32890
$ ~/Gearman-Driver$ telnet localhost 12345
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying fe80::1...
telnet: connect to address fe80::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
status
GDExamples::Sleeper::ZzZzZzzz   3       6       3
GDExamples::Sleeper::long_running_ZzZzZzzz      1       2       1
GDExamples::WWW::is_online      0       1       0
.

DESCRIPTION

By default Gearman::Driver opens a management console which can be used with a standard telnet client. It's possible to list all running worker processes as well as changing min/max processes on runtime.

Each successful command ends with a colon. If a command throws an error, a line starting with 'ERR' will be returned.

COMMANDS

status

Parameters: none

GDExamples::Sleeper::ZzZzZzzz   3       6       3
GDExamples::Sleeper::long_running_ZzZzZzzz      1       2       1
GDExamples::WWW::is_online      0       1       0
.

Columns are separated by tabs in this order:

  • job_name

  • min_childs

  • max_childs

  • current_childs

set_min_childs

Parameters: job_name min_childs

set_min_childs asdf 5
ERR invalid_job_name: asdf
set_min_childs GDExamples::Sleeper::ZzZzZzzz ten
ERR invalid_value: min_childs must be >= 0
set_min_childs GDExamples::Sleeper::ZzZzZzzz 10
ERR invalid_value: min_childs must be smaller than max_childs
set_min_childs GDExamples::Sleeper::ZzZzZzzz 5
OK
.

set_max_childs

Parameters: job_name max_childs

set_max_childs asdf 5
ERR invalid_job_name: asdf
set_max_childs GDExamples::Sleeper::ZzZzZzzz ten
ERR invalid_value: max_childs must be >= 0
set_max_childs GDExamples::Sleeper::ZzZzZzzz 0
ERR invalid_value: max_childs must be greater than min_childs
set_max_childs GDExamples::Sleeper::ZzZzZzzz 6
OK
.

quit

Parameters: none

Closes your connection gracefully.

AUTHOR

Johannes Plunien <plu@cpan.org>

COPYRIGHT AND LICENSE

Copyright 2009 by Johannes Plunien

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO