GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Gearman::Server::Client(3) User Contributed Perl Documentation Gearman::Server::Client(3)

Gearman::Server::Client

Used by Gearman::Server to instantiate connections from clients. Clients speak either a binary protocol, for normal operation (calling functions, grabbing function call requests, returning function values, etc), or a text-based line protocol, for relatively rare administrative / monitoring commands.

The binary protocol commands aren't currently documented. (FIXME) But they're well-implemented in Gearman::Client, Gearman::Worker, and Gearman::Client::Async, if that's any consolation.

The line-based administrative commands are documented below.

All binary protocol exchanges between clients (which can be callers, workers, or both) and the Gearman server have common packet header:

  4 byte magic  -- either "\0REQ" for requests to the server, or
                   "\0RES" for responses from the server
  4 byte type   -- network order integer, representing the packet type
  4 byte length -- network order length, for data segment.
  data          -- optional, if length is non-zero

A debug command. The server will reply with the same data, in a echo_res (type=17) packet.

FIXME: auto-generate protocol docs from internal Gearman::Util table, once annotated with some English?

These commands are used for administrative or statistic tasks to be done on the gearman server. They can be entered using a line based client (telnet, etc.) by connecting to the listening port (7003) and are also intended to be machine parsable.

Emits list of registered workers, their fds, IPs, client ids, and list of registered abilities (function names they can do). Of format:

  fd ip.x.y.z client_id : func_a func_b func_c
  fd ip.x.y.z client_id : func_a func_b func_c
  fd ip.x.y.z client_id : func_a func_b func_c
  .

It ends with a line with just a period.

The output format of this function is tab separated columns as follows, followed by a line consisting of a fullstop and a newline (".\n") to indicate the end of output.
Function name
A string denoting the name of the function of the job
Number in queue
A positive integer indicating the total number of jobs for this function in the queue. This includes currently running ones as well (next column)
Number of jobs running
A positive integer showing how many jobs of this function are currently running
Number of capable workers
A positive integer denoting the maximum possible count of workers that could be doing this job. Though they may not all be working on it due to other tasks holding them busy.

Output format is zero or more lines of:

    [Job function name]\t[Uniq (coalescing) key]\t[Worker address]\t[Number of listeners]\n

Follows by a single line of:

    .\n

\t is a literal tab character \n is perl's definition of newline (literal \n on linux, something else on win32)

Output format is zero or more sections of:

One line of:

    [Client Address]\n

Followed by zero or more lines of:

    \t[Job Function]\t[Uniq (coalescing) key]\t[Worker Address]\n

Follows by a single line of:

    .\n

\t is a literal tab character \n is perl's definition of newline (literal \n on linux, something else on win32)

For a given function of job, the maximum queue size is adjusted to be max_queue_size jobs long. A negative value indicates unlimited queue size.

If the max_queue_size value is not supplied then it is unset (and the default maximum queue size will apply to this function).

This function will return OK upon success, and will return ERR incomplete_args upon an invalid number of arguments.

Close the server. Or "shutdown graceful" to close the listening socket, then close the server when traffic has died away.

Returns server version.
2009-10-05 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.