|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (17)
View Page Historyusage: Petals JMX Command Line Interface
[-d] [-y] [-h <host>] [-n <port>] [-u <user>] [-p <password>] [-H | -V | [--file ] <filename> | -c -- <command> <command-args> | -C]
-c,--command <command> Execute a command given on the command line.
-V,--version Print the version number and exit.
To get help on a command, use the command 'help' on command-line: petals-cli.sh -c -- help <command>
Available commands:
{code}
{tip}Options of Petals CLI are [POSIX.1-2008|http://pubs.opengroup.org/onlinepubs/9699919799/] or [IEEE Std 1003.1|http://pubs.opengroup.org/onlinepubs/9699919799/] compliant.
h1. Petals CLI: the Basis
Launching Petals CLI with the following command line executes the command specified on the command line.
{code}
{code}
> ./petals-cli.sh -c -- <command> <command-args>
{code}
The help on a command is available by using the command '_help_'. A usage and a description of the command is displayed:
{code}
{code}
> ./petals-cli.sh -c -- help <command>
usage: <command> <command-arguments>
All the required parameters for a JMX connection must be configurable on the command line as options:
{code}
{code}
> ./petals-cli.sh -h <host> -n <port> -u <user> -p <password> -c -- <command>
> ./petals-cli.sh -h <host> -n <port> -u <user> -p <password> -C
petals-cli@<host1>:<port1>>
petals-cli@<host1>:<port1>>
An alias can also be used.
{code}
{code}
> ./petals-cli.sh -a <alias> -c -- <command>
> ./petals-cli.sh -a <alias> -C
petals-cli@<host1>:<port1>>
petals-cli@<host1>:<port1>>
{code}
> ./petals-cli.sh -c -- stop
{code}
An artifact can be started by using the '_start-artifact_' command:
{code}
{code}
> ./petals-cli.sh -c -- start-artifact [ -u <artifact-file> | -a <artifact-id> [<artifact-type>] ]
{code}
where:
where:
An artifact can be stopped by using the command '_stop\-_{_}artifact_':
{code}
{code}
> ./petals-cli.sh -c -- stop-artifact [ -u <artifact-file> | -a <artifact-id> [<artifact-type>] ]
{code}
where:
where:
All the installed JBI artefacts can be listed using the command '_list \[-p <artifact-pattern> \] \[-t artifact-type\]_':
{code}
{code}
> ./petals-cli.sh -c -- list
petals-sl-mysql Installed SL
petals-bc-soap Loaded BC
petals-bc-soap Loaded BC
Information about a JBI artifact can be got with the '_show_' command:
{code}
{code}
> ./petals-cli.sh -c -- show [-e] [ -u <artifact-file> | -a <artifact-id> [<artifact-type>] ]
{code}
where:
where:
To get the version of a Petals node, the version of the JVM running Petals node, and its operating system, use the '_version_' command:
{code}
{code}
> ./petals-cli.sh -c -- version
Petals JBI Container 3.1.4-SNAPSHOT
Java(TM) SE Runtime Environment 1.6.0_26-b03
Java(TM) SE Runtime Environment 1.6.0_26-b03
The container can be stopped by using the '_stop_' command with the argument '_container_':
{code}
{code}
> ./petals-cli.sh -c -- stop container
{code}
The container can be shutdowned by using the command '_stop_' with the argument '_container_' and the parameter '_\--shutdown_'.
{code}
{code}
> ./petals-cli.sh -c -- stop container --shutdown
Are you sure you want to shutdown the container? (y/n)
{code}
{code}
For commands requiring at least one option, an error can occur if the operand flag ({{'--'}}) is missing:
{code}
{code}
> ./petals-cli.sh -h localhost -n 7700 -u petals -p petals -c -- deploy -u file:///.../my-archive.zip
ERROR on command 'deploy': Missing option(s):b, u
usage: deploy [-b <url> | -u <url>] [-D
usage: deploy [-b <url> | -u <url>] [-D