WAS v8.5 > Administer applications and their environment > Use the administrative clientsUse command-line tools
WAS v8.5 provides many tools that we can call from a command line.
There are several command-line tools used 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, we 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, to start the application server MyServer for the profile test, invoke startServer MyServer -profileName test. If we specify myserver for the server name, the startServer script fails.
Running command line tools on the Microsoft Windows Vista or later Microsoft operating system: On the Windows Vista, Windows Server 2008, and Windows 7 operating systems, we can install WAS as either Administrator or non-Administrator. When it is installed as Administrator, certain operations (such as those involving Windows Services) require Administrator privileges. To ensure that WAS command-line tools have sufficient privileges, run them with elevated administrator authority on systems that have the Windows User Account Control (UAC) Run all administrators in Admin Approval Mode policy enabled. When you run these command-line tools from a Command Prompt, run them from a Command Prompt window that is launched by performing the following actions:
- Right-click a Command Prompt shortcut.
- Click Run As Administrator.
When you open the Command Prompt window as Administrator, an operating-system dialog appears that asks you to continue. Click Continue to proceed.
Examples of these tools are the startServer command, stopServer command, firststeps command, and the Profile Management Tool. If we are using a Windows Server Core installation of Windows Server 2008, any WAS commands that require a graphical interface are not supported since a Windows Server Core system does not have a graphical user interface. Therefore, commands such as launchpad.exe or ifgui.bat are not supported on that type of Windows Server 2008 installation.
Restriction: These command-line tools do not apply to the Liberty profile. See Administer the Liberty profile instead.
Use the following general steps to run a command:
- Open a system command prompt.
- 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:
- cd 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.
- 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 we 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. We can override the default location for the command log file using the -logfile option for the command.
For more information about using profiles, including how to obtain a list of profiles, see the information about manageprofiles.sh topic.
Subtopics
- Example: Security and the command line tools
To enable WAS security, provide the command line tools with authentication information.- manageprofiles command
Use manageprofiles.sh to create, delete, augment, back up, and restore profiles, which define runtime environments. Using profiles instead of multiple product installations saves disk space and simplifies updating the product because a single set of core product files is maintained.- managesdk command
The managesdk command provides the names of software development kits used by the product.- startServer command
The startServer command reads the configuration file for the specified server process and starts that server process.- stopServer command
The stopServer command reads the configuration file for the specified server process. This command sends a Java management extensions (JMX) command to the server telling it to shut down.- serverStatus command
Use the serverStatus command to obtain the status of one or all of the servers configured on a node.- backupConfig command
The backupConfig command is a simple utility to back up the configuration of your node to a file.- restoreConfig command
Use the restoreConfig command to restore the configuration of your node after backing up the configuration using backupConfig.- EARExpander command
Use the EARExpander command to expand an EAR file into a directory to run the application in that EAR file.- GenPluginCfg command
The GenPluginCfg command is used to regenerate the WebSphere web server plug-in configuration file, plugin-cfg.xml.- versionInfo command
The versionInfo command generates a report that includes a list of installed fix packs and interim fixes.- genVersionReport command
The genVersionReport command uses the versionInfo command to generate the versionReport.html report file in the current working directory, which is usually the bin directory. The report includes a list of installed fix packs and interim fixes.- historyInfo command
The historyInfo command generates a report that includes a history of installed or uninstalled fix packs and interim fixes.- genHistoryReport command
The genHistoryReport command generates the historyReport.html report file in the current working directory, which is usually the bin directory. The report includes a list of installed or uninstalled fix packs and interim fixes. The genHistoryReport script invokes the historyInfo script specifying the correct parameters to place the information generated into an HTML file in the current directory.- registerNode command
Use the registerNode command to register a stand-alone node with an administrative agent so the administrative agent can manage the node.- deregisterNode command
Use the deregisterNode command to unregister a node from an administrative agent so that we can use the node stand-alone or register the node with another administrative agent.- revokeCertificate command
The revokeCertificate command uses an implementation class that is passed to communicate with a certificate authority (CA) server to revoke a certificate. Processing this command sends a revocation request to the CA server to mark this certificate as revoked.- requestCertificate command
The requestCertificate command uses an implementation class that is passed in to communicate with a certificate authority (CA) server to request a CA signed certificate. The command then adds the certificate to a supplied keystore.- createCertRequest command
The createCertRequest command creates a PKCS10 certificate request and stores it in a client keystore so that it can be used to send to a certificate authority (CA) server using the requestCertificate command line utility.- queryCertificate command
The queryCertificate command uses an implementation class that is passed to communicate with a certificate authority (CA) server and query a certificate.
Related
Get started with wsadmin scripting