The WASService command line tool enables you create a service for a product Java process on Linux and Windows operating systems.
The wasservice.sh command file is
located in the app_server_root\bin directory.
The WASService.exe command file
is located in the app_server_root\bin directory.
The command syntax is as follows:
wasservice.sh -start service_name [optional startServer.bat parameters]
WASService.exe -start service_name [optional startServer.bat parameters]
The command syntax is as follows:
wasservice.sh -add service_name -serverName server_name -profilePath server_profile_directory [-wasHome app_server_root] [-startArgs additional_start_arguments] [-stopArgs additional_stop_arguments] [-userid user_id -password password]
WASService.exe -add service_name -serverName server_name -profilePath server_profile_directory [-wasHome app_server_root] [-configRoot configuration_repository_directory] [-startArgs additional_start_arguments] [-stopArgs additional_stop_arguments] [-userid user_id -password password] [-logFile service_log_file] [-logRoot server_log_directory] [-restart true | false] [-startType automatic | manual | disabled]
The command syntax is as follows:
wasservice.sh -remove service_name
WASService.exe -remove service_name
The command syntax is as follows:
wasservice.sh -stop service_name [optional stopServer.bat parameters]
WASService.exe -stop service_name [optional stopServer.bat parameters]
The command syntax is as follows:
wasservice.sh -status service_name
WASService.exe -status service_name
After creating a custom profile, you must federate the node to create a node agent server on the node. You can also use the administrative console of the deployment manager to create application server processes on the node. You can create a Windows service for the node agent server process
A node agent server is also created after adding an application server node to a deployment manager cell. You can create a service for the node agent server process as described later.
To view services, open the Control panel and click Administrative Tools > Services. Select a service to view information about it. Right click the service and click Properties. Four tabs provide information and functionality. For example, select the Setup type field on the General tab to change the setup type.
This example creates a service called IBM WebSphere Application Server V6.x - name_of_the_deployment_manager_service that starts the dmgr process:
WASService -add name_of_the_deployment_manager_service -servername deployment_manager_server_name -profilePath profile_root -wasHome app_server_root -logFile profile_root\logs\WS_startManager.log -logRoot profile_root\logs\deployment_manager_server_name -restart truewhere
After entering the command, messages that are similar to those in the following example display in the command window:
Adding Service: name_of_the_deployment_manager_service Config Root: profile_root\config Server Name: deployment_manager_server_name Profile Path: profile_root Was Home: app_server_root Start Args: Restart: 1 IBM WebSphere Application Server V6.x - name_of_the_deployment_manager_service service successfully added.
Click Start > Settings > Control Panel > Administrative Tools > Services to work with the new service.
This example creates a service called IBM WebSphere Application Server V6.x - name_of_the_node_agent_service that starts the nodeagent process:
WASService -add name_of_the_node_agent_service -servername node_agent_server_name -profilePath profile_root -wasHome app_server_root -logFile profile_root\logs\WS_startNode.log -logRoot profile_root\logs\node_agent_server_name -restart truewhere
After entering the command, messages that are similar to those in the following example display in the command window:
Adding Service: name_of_the_node_agent_service Config Root: profile_root\config Server Name: node_agent_server_name Profile Path: profile_root Was Home: app_server_root Start Args: Restart: 1 IBM WebSphere Application Server V6.x - name_of_the_node_agent_service service successfully added.
This example creates a service called IBM WebSphere Application Server V6.x - name_of_the_application_server_service that starts an application server process:
WASService -add name_of_the_application_server_service -servername application_server_name -profilePath profile_root -wasHome app_server_root -logFile profile_root\logs\WS_startServer.log -logRoot profile_root\logs\application_server_name -restart truewhere
After entering the command, messages that are similar to those in the following example display in the command window:
Adding Service: name_of_the_application_server_service Config Root: profile_root\config Server Name: application_server_name Profile Path: profile_root Was Home: app_server_root Start Args: Restart: 1 IBM WebSphere Application Server V6.x - name_of_the_application_server_service service successfully added.
This example for the Windows operating system updates an existing service called IBM WebSphere Application Server V6.x - Server2 Service with additional stop arguments, the user name and password. The parameters are automatically passed into the script that the Windows service uses to shutdown the system.
WASService -add "Server2 Service" -servername server2 -profilePath profile_root -logRoot profile_root\logs\server2 -stopArgs "-username user_name -password password" -encodeParams
For this Windows operating system example, if you issue the startServer server1 command or the stopServer server1 after creating a Windows service for server1, a message that is similar to the following example displays:
Because server1 is registered to run as a Windows Service, the request to start this server will be completed by starting the associated Windows Service.
If you issue the startNode command or the stopNode command after creating a Windows service for the nodeagent process, a message that is similar to the following example displays:
Because nodeagent is registered to run as a Windows Service, the request to start or stop this server will be completed by starting or stopping the associated Windows Service. Examine the log files to view messages related to this command.
If you issue the startManager command or the stopManager command after creating a Windows service for the deployment manager, a message that is similar to the following example displays:
Because dmgr is registered to run as a Windows Service, the request to start or stop this server will be completed by starting or stopping the associated Windows Service. Examine the log files to view messages related to this command.