WAS v8.5 > Reference > Command-line utilitiesLiberty profile: server command
Usage
server run server start myserver --clean
server package myserver --archive="c:\mybackup\" --include=all
server dump myserver --archive="c:\mybackup\" --include=thread
server javadump myserver
server javadump myserver --include=heap,system
Options
server command options...
--archive="/path/to/archive" Target file for the package or dump operation. Can be relative path to LIBERTY_PROFILE directory, or an absolute path. Default archive target is a compressed file with the server name, which will be stored in the installation root directory. Use quotation marks if the value contains spaces. --clean Clean cached information related to this server instance. --include=value,value,... Type of diagnostic information to be captured. Comma-delimited list of values...
all Package all the files in the Liberty profile installation directory. If the ${WLP_USER_DIR} and ${WLP_OUTPUT_DIR} are defined in the server.env file, the files under them are packaged. This value only applies to the package operation. usr Package the files in... ${WLP_USER_DIR}
This value only applies to the package operation.
heap Generate heap dump to diagnose memory leaks. Shows live objects in the memory and references between them. On IBM J9 resulting file is named... heapdump.date.time.processID.sequenceNumber.phd
On HotSpot resulting file is named...
java.date.time.processID.sequenceNumber.hprof
This value applies to both the dump and javadump operations
system Generate system dump to diagnose the memory leaks and find defects in the virtual machine. Only supported on IBM J9 virtual machines, the resulting file is named... core.date.time.processID.sequenceNumber.dmp
Applies to both dump and javadump operations.
thread Diagnose hung threads, deadlocks, and excessive CPU issues. Created with the javadump command. Applies to both dump and javadump operations. On IBM J9 virtual machines, the resulting file is named... javacore.date.time.processID.sequenceNumber.txt
On HotSpot virtual machines, the resulting file is named...
javadump.date.time.processID.sequenceNumber.txt
Only supported when server is running on the Java SDK. If the server is started with a JRE, an error will be reported indicating the server does not support the dump type. This restriction only applies to HotSpot virtual machines; the thread Java dump type is supported on any IBM JVM (JRE or SDK).
Exit codes
The following exit codes are available for the server command and the equivalent executable JAR file ws-launch.jar:
0 OK. 0 indicates successful completion of the requested operation. For server status, 0 indicates the server is running. 1 For server status, 1 indicates the server is not running. For other operations, it indicates invocation of a redundant operation. For example, starting a started server or stopping a stopped server. This code might also be returned by JVM if invalid Java options are used. 2 The server does not exist. 3 An unsupported action was called on a running server. For example, the server is running when the package action is called. 4 An unsupported action was called on a stopped server. For example, the server is not running when the dump action is called 5 Unknown server status. For example, the workarea directory is missing, or the Attach API fails to work. >=20 Return codes greater than or equal to 20 indicates that an error occurred while performing the requested action. Messages will be printed and captured in log files with more information about the error.
Related
Generate a Liberty profile server dump
Packaging a Liberty profile server
Create a Liberty profile server manually
Use Ant to automate tasks for the Liberty profile