The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

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 dot. 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_processes

  • max_processes

  • current_processes

set_min_processes

Parameters: job_name min_processes

    set_min_processes asdf 5
    ERR invalid_job_name: asdf
    set_min_processes GDExamples::Sleeper::ZzZzZzzz ten
    ERR invalid_value: min_processes must be >= 0
    set_min_processes GDExamples::Sleeper::ZzZzZzzz 10
    ERR invalid_value: min_processes must be smaller than max_processes
    set_min_processes GDExamples::Sleeper::ZzZzZzzz 5
    OK
    .

set_max_processes

Parameters: job_name max_processes

    set_max_processes asdf 5
    ERR invalid_job_name: asdf
    set_max_processes GDExamples::Sleeper::ZzZzZzzz ten
    ERR invalid_value: max_processes must be >= 0
    set_max_processes GDExamples::Sleeper::ZzZzZzzz 0
    ERR invalid_value: max_processes must be greater than min_processes
    set_max_processes GDExamples::Sleeper::ZzZzZzzz 6
    OK
    .

quit

Parameters: none

Closes your connection gracefully.

shutdown

Parameters: none

Shuts Gearman::Driver down.

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