- From a Windows Command Prompt, enter the wsadmin.bat command to get a wsadmin command prompt. (the wasamin.bat is in :C:\IBM\WebSphere\AppServer\profiles\AppSrv01\bin not in :C:\IBM\WebSphere\AppServer\bin)
Note: If security is enabled or the default SOAP ports have been changed, you will need to pass additional parameters to the batch file in order to get a wsadmin prompt. For example:
wsadmin.bat [-host host_name] [-port port_number] [-user userid[-password password]
Note: You can connect wsadmin to any of the server JVMs in the cell. After running the wsadmin command it will display the server process for which it has attached to. - Get a handle to the problem application server:
wsadmin> set jvm [$AdminControl completeObjectName type=JVM,process=server1,*]
Where server1 is the name of the application server that you want a heapdump from. If wsadmin is connected to a Deployment Manager and if the server names in the cell are not unique, then you can qualify the JVM with a node attribute in addition to the process name.
Note: The contents in brackets "[.....]", along with the brackets, is not optional. It must be entered to set the jvm object. Also, note that there is a space between the words "completeObjectName" and "type", but not a linefeed: - Generate a heapdump:
wsadmin> $AdminControl invoke $jvm generateHeapDump
3B: If you want a javacore too:
wsadmin> $AdminControl invoke $jvm dumpThreads
(Please note that on older versions of WebSphere you will also get a heapdump when you request a javacore, so do not be surprised if you end up with two heapdumps.)