Administering CICS Liberty using the wlpenv script and WebSphere Application Server Liberty command line utilities

Your Liberty installation provides a generic server-script, which can be invoked against any instance of a Liberty server, to perform administrative actions or to generate diagnostic reports. For convenience, each Liberty JVM server will generate a wrapper to this script called wlpenv. This wrapper script sets up the server-specific environment values necessary to execute the generic script against that server. The wlpenv script facilitates CICS® support for the WebSphere® Application Server Liberty command line utilities, but be aware that not all of the utilities are appropriate to run against a CICS Liberty run time.

The wlpenv script is unique to each JVM server and is created and updated every time that you successfully enable the Liberty JVM server. The script is created in the working directory of that JVM server, which is either the default location WORK_DIR/APPLID/JVMSERVER or as specified in the JVM profile.

Running the wlpenv script

To run the wlpenv script in the UNIX System Services shell, change directory to the WORK_DIR as specified in the JVM profile, and run the script with the Liberty command as an argument, for example:
./wlpenv productInfo version
./wlpenv server dump --archive=package_file_name.dump.pax --include=heap
./wlpenv server pause <server_name> --target=defaultHttpEndpoint
./wlpenv server resume <server_name> --target=defaultHttpEndpoint

For more information about Liberty commands, see Pausing and resuming a Liberty server from the command line, productInfo command and Generating a Liberty server dump from the command line.

Supported and unsupported WebSphere Application Server Liberty command line utilities

The following table gives an overview of the supported, and unsupported, commands. The Liberty commands below are specified as an argument of the server command, as shown in the examples given in Running the wlpenv script.

Table 1. CICS Liberty support for WebSphere Application Server Liberty command line utilities
Liberty command line utility CICS support Description
create Supported This command creates the configuration for a standalone Liberty server, and further modification of the configuration is needed for the Liberty server to run in a CICS JVM server environment.
debug Not supported This command runs the named server in a foreground console directly on z/OS®. CICS Liberty run time is not designed to run outside of CICS. Attempts to use this command in the CICS environment result in errors.
dump Supported This command creates a snapshot of the server state and puts it all into an archive.
javadump Supported This command takes a Java™ dump.
list Supported This command lists all the servers in that location.
package Provided as-is This command can package a Liberty server or Liberty run time. The package command is not CICS-aware and the results of running on a CICS Liberty are unpredictable.
pause Supported This command pauses all or specific components that can be paused on the server.
resume Supported This command resumes all or specific components that are paused on the server.
run Not supported This command launches the server in the foreground. CICS Liberty run time is not designed to run outside of CICS. Attempts to use this command in the CICS environment result in errors.
start Not supported This command launches the server in the background. CICS Liberty run time is not designed to run outside of CICS. Attempts to use this command in the CICS environment result in errors.
stop Not supported This command launches the server in the background. CICS Liberty run time is not designed to run outside of CICS. Attempts to use this command in the CICS environment result in errors.
status Supported This command checks whether a specified server is running.
version Supported This command displays the version information of the current server and Java runtime environment.
help Supported This command gets the command-line script help, including details of more options.

For more information about the WebSphere Application Server Liberty command line utilities, see Administering Liberty from the command line.