### Navigation

- index
- modules |
- next |
- previous |
- python-gearman v2.0.2 documentation »
- 1. Gearman Library documentation »

# 1.3. `gearman.admin_client` — Gearman Admin client

class `gearman.admin_client.``GearmanAdminClient`(host_list=None, poll_timeout=10.0)

  GearmanAdminClient :: Interface to send/receive administrative commands to a Gearman server

  This client acts as a BLOCKING client and each call will poll until it receives a satisfactory server response

  http://gearman.org/index.php?id=protocol See section ‘Administrative Protocol’

## 1.3.1. Interacting with a server

`GearmanAdminClient.``send_maxqueue`(task, max_size)

  Sends a request to change the maximum queue size for a given task

`GearmanAdminClient.``send_shutdown`(graceful=True)

  Sends a request to shutdown the connected gearman server

`GearmanAdminClient.``get_status`()

  Retrieves a list of all registered tasks and reports how many items/workers are in the queue

`GearmanAdminClient.``get_version`()

  Retrieves the version number of the Gearman server

`GearmanAdminClient.``get_workers`()

  Retrieves a list of workers and reports what tasks they’re operating on

Checking server state:

    gm_admin_client = gearman.GearmanAdminClient(['localhost:4730'])

    # Inspect server state
    status_response = gm_admin_client.get_status()
    version_response = gm_admin_client.get_version()
    workers_response = gm_admin_client.get_workers()

## 1.3.2. Testing server response times

`GearmanAdminClient.``ping_server`()

  Sends off a debugging string to execute an application ping on the Gearman server

Checking server response time:

    gm_admin_client = gearman.GearmanAdminClient(['localhost:4730'])
    response_time = gm_admin_client.ping_server()

### Navigation

- index
- modules |
- next |
- previous |
- python-gearman v2.0.2 documentation »
- 1. Gearman Library documentation »