Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Code Block
usage: system <subcommand> <options>

This command starts the Platform if it is not running, and then starts/stops pico instances on containers that have been set up for remote execution.

Note
title

Note!

This command is valid only for the MZ_HOME owner.

You can specify which pico instances that are to be started, stopped, or restarted by adding a target path to the subcommands. The target path is specified as follows:

Code Block
theme
languagetextEclipse
container:<container>/pico:<pico>

or

Code Block
languagetext
themeEclipse
container:<container>

Note

...

Note!

Set your desired environment variables in $MZ_HOME/bin/mzshr.env as this file will be loaded with local variables. Add the desired profiles, such as ". /home/mzadmin/.profile_mz".

You can specify both the container and pico instance as a regular expression.

title
Info

Example - Regular expression in target paths

Code Block
container:.*/pico:.*


By adding tag attributes you can perform additional filtering of the pico instances:

title
Info

Example - Adding tags to pico instances

Code Block
$ mzsh topo set -l pico:ec1 'settings.tags=[tag1,tag2]'
$ mzsh topo set -l pico:ec2 'settings.tags=[tag1]'
 

Run the following command to start the pico instances with the tag tag1.

Code Block
$ mzsh system start -t tag1

The following subcommands are available with mzsh system:

  • help

  • restart

  • start

  • status
  • stop

help

Code Block
Usage: system help [<subcommand>]

...

Code Block
languagetext
$ mzsh system help <command>

restart

Code Block
Usage: system restart [--dry-run] [-services] [-t, --tag <tag>] [--timeout-seconds] [-v, --verbose] [<target path>]

Use system restart to stop and start pico instances in one or more containers. The Platform will be started if it is not already running. However, the command does not stop the Platform.

Option

Description

[--dry-run]

Lists the picos instances that are addressed by the command, but the command is not executed.

[-t, --tag <tag>]

Filter that excludes all pico

instance

instances that do not contain the specified tag.

[--timeout-seconds]

Sets the maximum allowed time for all calls to complete. The default value is 300 seconds.

[-v, --verbose]

Use this option for detailed output from the command.

start

Code Block
Usage: system start [--dry-run] [-t, --tag <tag>] [--timeout-seconds] [-v, --verbose]

Use system start to start pico instances in one or more containers. The Platform will be started if it is not already running. 

Option

Description

[--dry-run]

Lists the picos instances that are addressed by the command, but the command is not executed.

[-t, --tag <tag>]

Includes pico instances in the target path

that contain the specified tag.[--timeout-seconds]

Sets the maximum allowed time for all calls to complete. The default value is 300 seconds.

[-v, --verbose]Use this option for detailed output from the command.

status

Code Block
Usage: system status [--dry-run] [-t, --tag <tag>] [--timeout-seconds] [-v, --verbose] [<target path>]

Use system status to retrieve the running status of pico instances in one or more containers. The Platform will be started if it is not already running. 

OptionDescription

[--dry-run]

Lists the picos instances that are addressed by the command, but the command is not executed.

[-t, --tag <tag>]

Filter

that

excludes all pico instance that do not

contain the specified tag.

[--timeout-seconds]

Sets the maximum allowed time for all calls to complete. The default value is 300 seconds.

[-v, --verbose]

Use this option for detailed output from the command.

stop

Code Block
Usage: system stop [--dry-run] [-t, --tag <tag>] [--timeout-seconds] [-v, --verbose] [<target path>]

Use system start to start pico instances in one or more containers. The Platform will be started if it is not already running. 

Option

Description

[--dry-run]

Lists the picos instances that are addressed by the command, but the command is not executed.

-t, --tag <tag>]

Includes pico instances in the target path that contain the specified tag.

[--timeout-seconds]

Sets the maximum allowed time for all calls to complete. The default value is 300 seconds.

[-v, --verbose]

Use this option for detailed output from the command.

Return Codes

Listed below are the different return codes for the system command:

Code

Description

-1

Will be returned if there is an old process running or if the remote (../temp/.remote) file cannot be deleted.

0

Will be returned if the command was successful, or if there are not startable processes defined.

1

Will be returned if the JVM failed to start. (The JVM has logged too much on stderr.)

102

Will be returned if the JVM failed to start. (The timeout on the callback from the JVM was exceeded.)

103

Will be returned if the command has been interrupted with CTRL-C.

104

Will be returned if the JVM failed to start. (The JVM started with (a) critical error(s).)