Using command-line tools

The product provides many tools that you can call from a command line.

About this task

There are several command-line tools that you can use to start, stop, and monitor application server processes and nodes. These tools only work on local servers and nodes. They cannot operate on a remote server or node. To administer a remote server, you can use the wsadmin scripting program connected to the deployment manager for the cell in which the target server or node is configured.

The following information is common for each command:
  • Unless otherwise specified, all of the application server commands are located in the app_server_root/bin directory.
  • Parameter values that specify a server name, a node name or a cell name are case sensitive. For example, if you want to start the application server MyServer for the profile test, invoke startServer MyServer -profileName test. If you specify myserver for the server name, the startServer script fails.

Use the following general steps to run a command:

Procedure

  1. [z/OS] Open a system command prompt.
  2. Determine whether to run the script from the profile or application server root directory.
    Most command-line tools function relative to a particular profile. To determine if a command requires the -profileName parameter, refer to the documentation for that specific command. If you run a command from the app_server_root/bin directory and do not specify the -profileName parameter, the default profile for the product sets profile-specific variables. To specify a different profile, use one of the following options:
    • Navigate to the app_server_root/bin directory and run the following command, specifying the profile of interest as the value for the profileName parameter:
      startServer server1 -profileName AppServerProfile
    • When a profile is created, the application server creates a proxy script in the profile_root/bin directory for each script in the app_server_root/bin directory that is applicable to the type of profile created. When a proxy script is invoked, the profile-specific variables for the script are set based on the profile from which the script is invoked. To run the command for a specific profile, navigate to the profile_root/bin directory for the profile of interest to run the command.
  3. Run the command of interest.

Results

The command runs the requested function and displays the results on the screen.

Refer to the command log file for additional information. When you use the -trace option for the command, the additional trace data is captured in the command log file. The directory location for the log files is under the default system log root directory, except for commands related to a specific server instance, in which case the log directory for that server is used. You can override the default location for the command log file using the -logfile option for the command.

What to do next