Monitor JMX memory running on the server

Source: Internet
Author: User
Tags jconsole

Use JDK jconsole to monitor JMX

 

First, set the monitoring object port configuration Catalina. Sh

# Vi/usr/tomcat/bin/Catalina. Sh

Note:/usr/tomcat/bin/Catalina. Sh is the bin directory of the Tomcat directory (in Linux)

Add content before # OS specific support. $ VaR _ must _ be set to either true or false.

 

# Java_opts set memory

Java_opts = "-xms2g-xmx2g-XX: + useconcmarksweepgc-XX: + cmsincrementalmode-XX: newsize = 512 M-XX: maxpermsize = 256 m"

 

# Set JMX port information for catalina_opts

Catalina_opts = "$ catalina_opts-DCOM. Sun. Management. jmxremote-DCOM. Sun. Management. jmxremote. Port = 9004"

Catalina_opts = "$ catalina_opts-DCOM. Sun. Management. jmxremote. SSL = false-DCOM. Sun. Management. jmxremote. Authenticate = false"

 

Then, start the corresponding Tomcat and view the port running

[[Email protected] ~] # Netstat-antp | grep 9004
TCP 0 0: 9004: * Listen 2288/Java

Finally, verify that the local JDK has been installed.

Open CMD and run the following command to enter the Directory: C: \ Program Files \ Java \ jdk1.6.0 _ 43 \ bin.

C: \ Users \ shuaiqi> Cd/d c: \ Program Files \ Java \ jdk1.6.0 _ 43 \ bin

Execute the jconsole.exe File

C: \ Program Files \ Java \ jdk1.6.0 _ 43 \ bin> jconsole.exe

Now the JMX connection is enabled.

You can select local and remote processes.

Enter the remote address:

Note: you do not need to enter the user and password because the user and password are not required in the above settings. You can set it if necessary.

  

 

Monitor JMX memory running on the server

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.