command:server

getSystemInfo

getSystemInfo [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=] 

Use this method to get information about the system, including the Zend Server edition and version, PHP version, licensing information, etc. This method produces similar output on all Zend Server systems, and is future compatible.

  • --output-format
    Output format. Default is "xml", but you can use "json", or "kv" for key-value.

clusterGetServerStatus

clusterGetServerStatus [--servers=] [--force=] [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=] 

Use this method to get the list of servers in the cluster and the status of each one. On a Zend Server with no valid license, this operation fails. This operation causes Zend Server to check the status of servers and return fresh, non-cached information. This is different from the Servers List tab in the GUI, which may present cached information. Users interested in reducing load by caching this information should do it in their own code.

  • --servers
    A list of server IDs. If specified, the status is returned for these servers only. If not specified, the status of all the servers is returned.
  • --force
    Force. Default is false
  • --output-format
    Output format. Default is "xml", but you can use "json", or "kv" for key-value.

clusterAddServer

clusterAddServer --serverName= --serverIp= [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=] 

Add a new server to the cluster. On a Zend Server Cluster Manager with no valid license, this operation fails.

  • --serverName
    Server name.
  • --serverIp
    Server IP.
  • --output-format
    Output format. Default is "xml", but you can use "json", or "kv" for key-value.

clusterRemoveServer

clusterRemoveServer --serverId= [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--wait] [--output-format=] 

Remove a server from the cluster. The removal process may be asynchronous if Session Clustering is used. If this is the case, the initial operation will return an HTTP 202 response. As long as the server is not fully removed, further calls to remove the same server are idempotent. On a Zend Server with no valid license, this operation fails.

  • --serverId
    Server ID.
  • --wait
    This operation is asynchronous. When the "wait" option is added the client will wait until the operation really finishes on all servers.
  • --output-format
    Output format. Default is "xml", but you can use "json", or "kv" for key-value.

clusterDisableServer

clusterDisableServer --serverId= [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=] 

Disable a cluster member. This process may be asynchronous if Session Clustering is used. If this is the case, the initial operation returns an HTTP 202 response. As long as the server is not fully disabled, further calls to this method are idempotent. On a Zend Server with no valid license, this operation fails.

  • --serverId
    Server ID.
  • --output-format
    Output format. Default is "xml", but you can use "json", or "kv" for key-value.

clusterEnableServer

clusterEnableServer --serverId= [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=] 

Re-enable a cluster member. This process may be asynchronous if Session Clustering is used. If this is the case, the initial operation will return an HTTP 202 response. This action is idempotent, and running it on an enabled server will result in a 200 OK response with no consequences. On a Zend Server with no valid license this operation fails.

  • --serverId
    Server ID.
  • --output-format
    Output format. Default is "xml", but you can use "json", or "kv" for key-value.

clusterReconfigureServer

clusterReconfigureServer --serverId= [--doRestart=] [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=] 

Re-configure a cluster member to match the cluster's profile. This operation will fail on a Zend Server with no valid license.

  • --serverId
    Server ID.
  • --doRestart
    Specify whether to restart the re-configured server after the re-configure action. The default is FALSE.
  • --output-format
    Output format. Default is "xml", but you can use "json", or "kv" for key-value.

restartPhp

restartPhp [--servers=] [--force=] [--parallelRestart=] [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=] 

Restart PHP on all servers or on specified servers in the cluster. A 202 response in this case does not always indicate a successful restart of all servers. Use the clusterGetServerStatus command to check the server(s) status again after a few seconds.

  • --servers
    A list of server IDs to restart. If not specified, all servers in the cluster will be restarted. In a single Zend Server context this parameter is ignored.
  • --force
    Force a full restart of all server’s components. The default value is 'FALSE'.
  • --parallelRestart
    This parameter was removed in version 1.3 and has no effect on ZS6, even if used in 1.2 context
  • --output-format
    Output format. Default is "xml", but you can use "json", or "kv" for key-value.

getServerProfile

getServerProfile [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=] 

Get the server profile: Development or Production .

  • --output-format
    Output format. Default is "xml", but you can use "json", or "kv" for key-value.

setServerProfile

setServerProfile [--production=] [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=] 

Set the server profile after the server was bootsraped: Development or Production.

  • --production
    Production flag. If "true" - sets production mode, if "false" - development. By default TRUE.
  • --output-format
    Output format. Default is "xml", but you can use "json", or "kv" for key-value.

getLogFiles

getLogFiles [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=] 

Get list of log files on the server.

  • --output-format
    Output format. Default is "xml", but you can use "json", or "kv" for key-value.

getBrowserIp

getBrowserIp [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=] 

Get the IP of the browser that accesses the web API - used as a button "use browser IP" in IP filters.

  • --output-format
    Output format. Default is "xml", but you can use "json", or "kv" for key-value.

tasksComplete

tasksComplete [--servers=] [--tasks=] [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=] 

Check if server has completed all of its assigned tasks. This action is used for polling on Zend Server Daemon activities which start asynchronously. When used in a cluster, the entire cluster may be considered a single entity so that a positive response is returned only when the entire cluster has completed its assigned tasks. This action only returns a general Boolean response and does not display which tasks remain to be performed, etc.

  • --servers
    List of server IDs. If specified, status will be returned for these servers only. If not specified, the status of all servers will be returned.
  • --tasks
    Check completion of the provided task IDs only, ignore other tasks. If no task IDs are specified, default is all tasks.
  • --output-format
    Output format. Default is "xml", but you can use "json", or "kv" for key-value.

getServerInfo

getServerInfo --serverId= [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=] 

Use this method to get information about the system, including the Zend Server edition and version, PHP version, licensing information, etc. This method produces similar output on all Zend Server systems, and is future compatible.

  • --serverId
    Server identifier to retrieve information for. In a single-server environment, the ID is 0.
  • --output-format
    Output format. Default is "xml", but you can use "json", or "kv" for key-value.

clusterGetServersCount

clusterGetServersCount [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=] 

Get the number of servers registered in the cluster. Note that this action ignores the servers’ current state and returns only a total number of known servers. In a single-server the response to this action is always 0.

  • --output-format
    Output format. Default is "xml", but you can use "json", or "kv" for key-value.

serverAddToCluster

serverAddToCluster --serverName= --dbHost= --dbUsername= --dbPassword= --nodeIp= --dbName= [--failIfConnected=] [--wait-db] [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--wait] [--output-format=] 

Join the current server to a cluster. If the cluster database is not set up, the server will attempt to create the database and then perform the join using the provided credentials. If possible, a user “zend” will be created and used to perform the connection.

  • --serverName
    Server name.
  • --dbHost
    Database host address to join the cluster.
  • --dbUsername
    Database credentials (username).
  • --dbPassword
    Database credentials (password).
  • --nodeIp
    Server IP.
  • --dbName
    Database name.
  • --failIfConnected
    Cause the action to completely fail if the server is already connected. Otherwise, a normal 200 status is returned without performing any action. Default: false.
  • --wait-db
    Checks if the DB credentials are correct from the machine where this script is running and waits max 3 minutes. Set this flag only if you are sure that the machine from where this tool is run can connect to the database server.
  • --wait
    This operation is asynchronous. When the "wait" option is added the client will wait until the operation really finishes on all servers.
  • --output-format
    Output format. Default is "xml", but you can use "json", or "kv" for key-value.

changeServerNameById

changeServerNameById --serverName= --serverId= [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=] 

Replace the current server name with a new one. This change is purely cosmetic - the server’s name does not influence any aspect of its accessibility or functionality.

  • --serverName
    Server name.
  • --serverId
    Server ID.
  • --output-format
    Output format. Default is "xml", but you can use "json", or "kv" for key-value.

clusterForceRemoveServer

clusterForceRemoveServer --serverId= [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=] 

Remove a server from the cluster. The removal process may be asynchronous if Session Clustering is used – if this is the case, the initial operation will return an HTTP 202 response. As long as the server is not fully removed, further calls to remove the same server are idempotent. On a Zend Server with no valid license, this operation will fail.

  • --serverId
    Server ID.
  • --output-format
    Output format. Default is "xml", but you can use "json", or "kv" for key-value.

restartDaemon

restartDaemon --daemon= [--servers=] [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=] 

Restart a Zend Server daemon on all servers or on specified servers in the cluster. A 202 response in this case does not always indicate a successful restart of all servers, and the user is advised to check the server(s) status again after a few seconds using the clusterGetServerStatus command.

  • --daemon
    One of the following values: jqd, monitor_node, scd, zdd.
  • --servers
    A list of server IDs to restart. If not specified, all servers in the cluster will be restarted. In a single Zend Server context this parameter is ignored.
  • --output-format
    Output format. Default is "xml", but you can use "json", or "kv" for key-value.

logsReadLines

logsReadLines --logName= [--serverId=] [--linesToRead=] [--filter=] [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=] 

Read a certain number of log lines from the end of the file log. If serverId is passed, then the request will be performed against that cluster member, otherwise it is performed locally.

  • --logName
    One of the following values: codetracing, datacache, deployment, dserver, jobqueue, jqd, monitor, monitor_node, monitor_ui, pagecache, php, sc, scd, statistics, utils, zdd, zem, zsd, php.
  • --serverId
    If passed, the log contents will be fetched from that cluster member, otherwise performed locally.
  • --linesToRead
    How many lines to read. defaults to a certain system-wide configurable setting. Limited by another such setting.
  • --filter
    Apply a certain case-insensitive string filter to the log lines.
  • --output-format
    Output format. Default is "xml", but you can use "json", or "kv" for key-value.

logsGetLogfile

logsGetLogfile --logName= [--serverId=] [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=] 

Retrieve the entire log file from the server or a remove cluster member.

  • --logName
    One of the following values: codetracing, datacache, deployment, dserver, jobqueue, jqd, monitor, monitor_node, monitor_ui, pagecache, php, sc, scd, statistics, utils, zdd, zem, zsd, php.
  • --serverId
    If passed, the log contents will be fetched from that cluster member, otherwise performed locally.
  • --output-format
    Output format. Default is "xml", but you can use "json", or "kv" for key-value.