There are a number of similar scripts that can be used to start, stop and check the status of WebSphere servers.
- serverStatus (this article)
- startServer | stopServer (start / stop application server)
- startManager | stopManager (start / stop network deployment manager)
- startNode | stopNode | syncNode (start / stop node)
The serverStatus.sh (Linux) or serverStatus.bat (Windows) script can be used to get the status of your various WebSphere servers, such as your application servers, deployment managers, nodes, et cetera. For example, here is how you would get the status of all of your WebSphere servers using serverStatus.sh on Linux.
AVOID TROUBLE
If you are prompted for a username and password, refer to username password and the soap.client.props sas.client.props ipc.client.props files.
${WAS_INSTALL_ROOT}/bin/serverStatus.sh -all
And here is how you would get the status of a specific server using serverStatus.bat on Windows.
${WAS_INSTALL_ROOT}\profiles\your_profile\bin\serverStatus.bat server_name
The serverStatus script without any additional command line options or flags will return the server status for the application servers, deployment managers, nodes in the default profile. manageprofiles.sh -listProfiles (Linux) or manageprofiles.bat -listProfiles (Windows) can be used to list the profiles.
~]# ${WAS_INSTALL_ROOT}/bin/manageprofiles.sh -listProfiles
[AppSrv01, AppSrv02]
manageprofiles.sh -getDefaultName (Linux) or manageprofiles.bat -getDefaultName (Windows) can be used to list the default profile.
~]# ${WAS_INSTALL_ROOT}/bin/manageprofiles.sh -getDefaultName
AppSrv01
If you have two (or more) profiles, the -profileName option can be used to return the server status for the application servers, deployment managers, nodes in the profile.
${WAS_INSTALL_ROOT}/bin/serverStatus.sh -profileName AppSrv01 -all
Or, you can use the serverStatus script in the profile directory.
${WAS_INSTALL_ROOT}/profiles/your_profile/bin/serverStatus.sh -all
Something like this should be returned if the server is stopped.
ADMU0116I: Tool information is being logged in file
/opt/WebSphere/AppServer/profiles/your_profile/logs/serverStatus.log
ADMU0128I: Starting tool with the your_profile profile
ADMU0503I: Retrieving server status for all servers
ADMU0505I: Servers found in configuration:
ADMU0506I: Server name: dmgr
ADMU0509I: The Deployment Manager "dmgr" cannot be reached. It appears to be
stopped.
Or something like this if the server is started.
ADMU0116I: Tool information is being logged in file
/opt/WebSphere/AppServer/profiles/your_profile/logs/serverStatus.log
ADMU0128I: Starting tool with the your_profile profile
ADMU0503I: Retrieving server status for all servers
ADMU0505I: Servers found in configuration:
ADMU0506I: Server name: dmgr
ADMU0508I: The Deployment Manager "dmgr" is STARTED.
If some issue occurs, there may be log files at ${WAS_INSTALL_ROOT}/configuration/ or ${WAS_INSTALL_ROOT}/profiles/your_profile/configuration/ that may have additional debugging details.
~]$ ls -l ${WAS_INSTALL_ROOT}/profiles/your_profile/configuration/
-rw-rw-r-- 1 john.doe wasadmins 4727 Jan 27 03:15 1674810957892.log
-rw-rw-r-- 1 john.doe wasadmins 4727 Jan 27 08:11 1674828717204.log
-rw-rw-r-- 1 john.doe wasadmins 4727 Jan 28 03:00 1674896402539.log
-rw-rw-r-- 1 john.doe wasadmins 4727 Jan 28 03:10 1674897002316.log
drwxrwsr-x 3 john.doe wasadmins 4096 Aug 25 21:37 org.eclipse.core.runtime
drwxrwsr-x 3 john.doe wasadmins 4096 Feb 17 2016 org.eclipse.equinox.app
drwxr-sr-x 4 john.doe wasadmins 4096 Aug 29 21:35 org.eclipse.osgi
drwxrwsr-x 2 john.doe wasadmins 4096 Jul 21 2022 org.eclipse.update
For example, once we had an issue where the serverStatus script was not producing any output, and the log showed this was due to a permissions issue.
~]$ cat /opt/WebSphere/AppServer/profiles/your_profile/configuration/1674897002316.log
!MESSAGE Error reading configuration: /opt/WebSphere/AppServer/profiles/your_profile/configuration/org.eclipse.osgi/.manager/.fileTableLock (Permission denied)
Did you find this article helpful?
If so, consider buying me a coffee over at