WebSphere Performance Tuning dump command
WebSphere - built enterprise applications, often with performance problems and, in severe cases, a memory overflow, is a very annoying thing to do. when the WebSphere application Server (WAS) runs, memory overflows, generating a large number of overflow files, such as Javacore, Heapdump and other files, which takes up a lot of disk space. In this case, a series of system problems often occur, such as All application services deployed in was error, the was even the console is inaccessible, and so on.
To solve the problem, we typically choose to restart the entire was or server, and then analyze the run log SystemOut.log,ystemErr.log , Ative_stdout.log , Native_stderr.log and when the system memory overflows. Javacore , Heapdump files to look for problems.
If we find in the test that the system has been running for a period of time and the response starts slowly, but was not hung up, the JavaCore,heapdump can be produced by manual operation . and other files, through the analysis of related files, logs to find out if the system has a memory overflow hidden danger.
Here's how to generate JavaCore,heapdump Files--websphere Dump command.
First, theLinux platform
Approximate steps:
1) Enter the bin directory of the was installation directory , and if it is WAS6.0, Enter your profile the bin directory;
2) Execute wsadmin.sh into wsadmin command line prompt will become wsadmin>
3) execute the following command:( Note change the Server1 to your server 's name, no space between two commas)
A) set the JVM environment variable:
b) generate the javacore file:
Wsadmin> $AdminControl Invoke $JVM dumpthreads
c) exit the WSADMIN command line:
Wsadmin> quit
After execution, the JavaCore file is generated in the was installation directory or in the profile directory , by analyzing the JavaCore and the associated SystemOut,systemerr and nativestd_err The file can tell if the system GC is normal and if there is a memory overflow condition.
Specific operation:
-- go to bin directory
[Email protected] bin]# pwd /opt/ibm/websphere/was6.1/profiles/appsrv01/bin
-- Enter WSADMIN command line mode
[[email protected] bin]#/wsadmin.sh-username Root-password root wasx7209i:connected to process ' server1 ' on node CsspvmNode02 using SOAP connector; The type of process Is:UnManagedProcessWASX8011W:AdminTask object is not available. Wasx7029i:for Help, enter: "$Help help"
-- set JVM Environment Variables
Wsadmin>set objectName [$AdminControl querynames websphere:type=jvm,process=server1, node=webnode01,*] websphere:name=jvm,process=server1,platform=proxy,node=csspvmnode02,j2eetype=jvm,j2eeserver=server1,version= 6.1.0.0,type=jvm,mbeanidentifier=jvm,cell=webnode01cell,spec=1.0
-- Generate heapdump file
Wsadmin> $AdminControl invoke $objectName generateheapdump /opt/ibm/websphere/was6.1/profiles/appsrv01/./ Heapdump.20100904.075650.3576.phd wsadmin>set JVM [$AdminControl querynames Websphere:type=jvm,process=server1, Node=webnode01,*]
-- Generate JavaCore file
Wsadmin> $AdminControl Invoke $JVM dumpthreadswsadmin>quit
--"webNode01" is the WebSphere node name.
Fetch thread:JavaCore
Set objectName [$AdminControl querynames websphere:type=jvm,process=server1,node=webnode01,*]set JVM [$AdminControl Querynames websphere:type=jvm,process=server1,node=webnode01,*] $AdminControl invoke $objectName dumpthreads$ Admincontrol Invoke $JVM Dumpthreads
Fetch stack:heapdump
Wsadmin-user Admin-password zxin10-c "$AdminControl invoke [$AdminControl querynames websphere:type=jvm,process= Server1,node=webnode01,*] Generateheapdump "$AdminControl invoke $JVM Generateheapdump$admincontrol invoke [$ Admincontrol Querynames websphere:type=jvm,process=server1,node=webnode01,*] Generateheapdump
Second, the Windows platform
Under Windows , the way to generate JavaCore and heapdump is simple.
1 using ctrl+break
If WebSphere is started in a command-line window and has a startup command-line window, you can generate JavaCore by using the Ctrl+break key in the command-line window . and heapdump.
2 Calling Programs
IBM 's JDK provides an interface that, by invoking this interface, can directly generate JavaCore and heapdump .
Generate JavaCore:
Call the JSP file with only one line of statements in the JSP, as shown below
<%com.ibm.jvm.dump.javadump ();%>
Generate Heapdump
Call the JSP file with only one line of statements in the JSP, as shown below
<%com.ibm.jvm.dump.heapdump ();%>
When the method is called , the associated JavaCore,Heapdump is generated in the was installation directory or in the directory under which the profile is located. file.
All right, here we have learned how to produce JavaCore,heapdump files, the problem comes again: how to analyze the resulting JavaCore , Heapdump where's the file? The following will continue to share the "JavaCore,heapdump File Analysis Method ".
WebSphere Performance Tuning dump command