Management commands
This topic contains an alphabetical list of the management commands that can be performed on any WebSphere sMash application. To issue these commands, your working directory should be the root directory of the application, or any directory below the root directory of the application.
info
- Description
-
Usage
- zero info
Retrieves the basic information required to access the application when it is in the running state. This usually includes the base URL and port numbers for the application once started but may include HTTPS settings or other information.
recycle
- Description
-
Usage
- zero recycle
Causes the application runtime to be recycled. The Java™ runtime process exits. The Java™ runtime process will not be started again until the new request is received, unless the immediateStart option is enabled in configuration. A recycle can be performed while the application is servicing requests.
There is no resolve step in the recycle of an application. While the recycle command is faster than separate stop and start commands, many changes to the configuration of the application are not picked up. It is recommended that for configuration changes, the application be stopped then started.
start
- Description
-
Usage
- zero start [-fg] [-d] [-v] [-G={config}] [-force] [-jvmarg={jvmarg}] [-pretaskarg={pretaskarg}] [-arg={arg}]
Start the application as a background process. The application will be available immediately, but the resources required by the application will be loaded only on demand.
The '-fg' option allows the application to be run directly on the local console in the foreground, rather than in the background.
The '-d' option enables minimal logging.
The '-v' option enables all logging.
The '-G' option allows the overriding values in the application configuration.
The '-force' option allows forcing application to attempt to start, regardless of current status
The '-jvmarg=', '-pretaskarg=', and '-arg-' options allow the passing of arguments to the jvm of the application. Any number of each argument is allowed
- The 'jvmarg' parameters will be passed as a jvm argument.
- The 'pretaskarg' parameters will be passed before the target task (usually 'run')
- The 'args' parameters will be passed to the after the target task
stats
- Description
-
Usage
- zero stats
Retrieves the current statistics for the application. The statistics available are dependent on the operating system and Java™ runtime environment that the application is using, but include information the following functions:
- Request statistics
- Java™ runtime heap and memory
- Operating system process resource
status
- Description
-
Usage
- zero status
Retrieves the current state of the application. Valid states are STOPPED, STARTED, and UNKNOWN. UNKNOWN can occur if the application has a running process associated with it but it can not be reached using its base URL as reported by the info command.
The status command can be used in scripts to determine the state of the application.
The '-pidonly' option enables checking to see if the processes for an application are started. Normally, checking the status of an application will confirm that it is also answering requests, which starts the jvm.
The return codes for this command are:
- 0 - application started
- 1 - command failed
- 2 - application stopped
- 3 - application state unknown
stop
- Description
-
Usage
- zero stop [-force]
Stops an application that is running.
Normally, the stop functions by connecting to the application and requesting that it stop. However, if the application is no longer responding to requests, the force option can be used to kill the application's processes.