Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Analysis of configuration example of jconsole and jvisualvm remote Monitoring websphere Server JVM

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

In this issue, Xiaobian will bring you an example analysis of jconsole and jvisualvm remote monitoring websphere server JVM configuration. The article is rich in content and analyzes and narrates from a professional perspective. After reading this article, I hope you can gain something.

jconsole is a tool that comes with JDK. It can monitor the application and release of all objects when Java programs are running, and count, analyze and visualize all information about memory management. We can use this information to determine if the program has a memory leak problem.

To use jconsole tool to analyze JVM problems of WAS, relevant configuration is required.

First we look at the WAS server configuration.

1. Log in to the was console https://10.4.119.18:9043/ibm/console/, find your own application server--java and process management--process definition--JAVA virtual machine, and then configure the general JVM parameters:

Add the following jvm parameter: -Djavax.management.builder.initial= -Dcom.sun.management.jmxremote

Note: spaces must be reserved after the equal sign, otherwise an error will be reported.

The requested URL/jre/lib/management/index.php was not found on this server.

com.sun.management.jmxremote.port=8999

com.sun.management.jmxremote.authenticate=false

com.sun.management.jmxremote.ssl=false

Note: execute netstat -ano first| grep 8999, check to see if this port is used. In addition, pay attention to the firewall configuration of port 8999, to release, otherwise the remote machine may not be connected.

3. Set jconsole remote login username and password

In/usr/IBM/WebSphere/AppServer/java/jre/lib/management, there is a jmxremote.password.template file with the username and password you want to set at the end.

root root@123 (username, password, can be modified at will)

Stop your application server on the was console and restart it.

Windows Client Settings

1. Enter the BIN directory where JAVA is located

2. Enter IP, port number, username and password for remote connection

3. The monitoring interface can see the usage of memory, classes, threads and CPU.

Using this tool in conjunction with JCA tools can be very convenient to analyze memory overflow problems.

Java VisualVM is also an integrated analysis tool for JDK and has been part of Sun JDK since JDK 6 Update 7. VisualVM can monitor application performance and memory footprint, monitor application threads, perform Thread Dump or Heap Dump, track memory leaks, monitor garbage collector, perform memory and CPU profiling, save snapshots for offline analysis of applications, and support browsing and manipulation on MBeans. VisualVM itself runs above JDK6, but JDK 1.4 and above programs can also be monitored by it.

Start method: enter the bin directory where JAVA_HOME is located, run jvisualvm.exe to start VisualVM

To connect remotely to the WAS server, you need to add JMX connection mode.

There are many reasons for memory overflow, such as:

1, the amount of data is too large; endless loop; static variables and static methods too much; recursion; can not determine whether the object is referenced;

2. The virtual machine does not recycle memory (memory leak);

To put it bluntly, memory overflow occurs when the memory used by the program to run is greater than the maximum memory that the virtual machine can provide. The memory overflow problem depends on the business and the size of the system. It may be uncommon for some systems, but it is still common for some systems.

Common solutions for memory overflow:

One is to optimize the program code. If the business is large and the logic is complex, minimize the references to global variables, and let the program release the references when it runs out of variables, so that the garbage collector can collect and release resources.

The second is physical solution, increase physical memory, and then increase memory space by modifying-Xms256m -Xmx2048m.

The above is the jconsole and jvisualvm remote monitoring websphere server JVM configuration example analysis shared by Xiaobian for everyone. If you happen to have similar doubts, you may wish to refer to the above analysis for understanding. If you want to know more about it, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report