mps-stop

Stop a server instance

Syntax

mps-stop [-C [path/]server_name] [-f] [-p | --purge] [-k | --kill] [-v] [--timeout hh:mm:ss]

Description

mps-stop [-C [path/]server_name] [-f] [-p | --purge] [-k | --kill] [-v] [--timeout hh:mm:ss] closes HTTP server socket and all open client connections immediately. All function requests that were executing when the command was issued are allowed to complete before the server shuts down.

Input Arguments

-C path/

Specify a path to the server instance. If this option is omitted, the current working folder and its parents are searched to find the server instance.

server_name

Name of the server to be stopped.

-f

Force success even if the server instance is not currently stopped. Stopping a stopped instance is considered an error.

-p | --purge

Removes working files in the instance directory. These files are usually removed during a graceful shutdown.

-k | --kill

Immediately and forcibly terminate any running processes for this instance. Use this option if a graceful shutdown has failed.

-v

Displays system messages relating to termination of server instance.

--timeout hh:mm:ss

Set a limit on how long mps-stop will run before returning either success or failure. For example, specifying --timeout 00:02:00 indicates that mps-stop should exit with an error status if the server takes longer than two (2) minutes to shut down. The instance continues to attempt to terminate even if mps-stop times out. If this option is not specified, the default behavior is to wait as long as necessary (infinity) for the instance to stop.

Examples

Stop server instance server_1, located in tmp folder. Force successful completion of mps-stop. Timeout with an error status if mps-stop takes longer than three (3) minutes to complete.

In this example, the verbose (-v) option is specified, which produces an output status message.

mps-stop -f -v -C /tmp/server_1 --timeout 00:03:00

Example Output

waiting for stop... (timeout = 00:03:00)

Tips

  • After issuing mps-stop, issue the mps-status command to verify the server instance has STOPPED.

  • If you are stopping a server instance in the current working folder, you do not need to specify a full path. Only specify the server name.

  • Note that the timeout option (--timeout hh:mm:ss) is specified with two (2) dashes, not one dash.

Introduced in R2012b