The EA version of Java Misstion Control (JMC) is finally out! JMC is a tool for analyzing the operational details of Java applications. JMC had to use the Oracle paid version (Product Editions) for business use. It is mostly used as a set with Java Flight Recorder (JFR), but well ... For me who does not use the paid version, it was unrelated, but it will be incorporated into OpenJDK side from Java 11 It was.
--Overview of JMC and JFR --http://www.oracle.com/webfolder/technetwork/jp/ondemand/ddd2014/B2-1.pdf
And ... finally, the EA version of the ** JMC 7.0.0 UPL license is out! !! !! ** ** JMC 7.0.0 EA Builds - http://jdk.java.net/jmc/
JMC builds These early-access, open-source builds are provided under the UPL .
I've had a lot of problems with the Oracle JDK, but I'm very happy to be able to use paid features in this way.
I will try the following two things.
--Real-time monitoring with JMX --Recording and reference with Java Flight Recorder
From the result, it worked fine.
Same as below. I'm running an application with basic GKE ... How to use jvisualvm in GKE + Java environment-https://qiita.com/h-r-k-matsumoto/items/6bd4ba191208745e012b
+--------+ +-------------------------+ +-----------------------+
| | | | | |
| PC | +--> | GCE: tunnel serever | +-> | GKE: applications |
| | | | | |
+--------+ +-------------------------+ +-----------------------+
--Monitoring with a PC terminal. And visualization. The GKE application will be monitored. --The PC terminal is Windows 10. GKE is 1.10.5-gke.3. --The tunnel server is CentOS 7.
The application to run is https://github.com/h-r-k-matsumoto/spring-boot-sample/tree/java11 is. * It is a java 11 tag.
Download the binary from the following site. In my case, Windows / x64 exe (sha256: 6888816db19c1ff7db9091a623b252ef222e83a3e9ac54dbce8982ff66875042) I dropped it and installed it according to the wizard. http://jdk.java.net/jmc/
I wasn't particularly addicted to it.
Digging a tunnel with SSH. Execute the following command on the PC machine.
> gcloud compute --project xxxxx ssh --zone xxxxx "tunnnel-server" -- -N -D 7199
Just run jmc and the command. It's also in the start menu.
Simply right-click on the target connection and click "Start JMX Console".
As shown below, you can check the information + α information that could be viewed with jvisualvm etc. such as overview, memory, threads, etc.
I was connected!
Right-click the target connection and click Start Flight Recording. The recording start screen is displayed. I will record for 10 minutes for the time being.
The screen will be displayed when the measurement period is over. I don't know how to look at it yet, but I was able to refer to the record safely for the time being! This will also make trouble tracking ... very easy? ?? ??
Even if you start it as shown below, proxy of socks protocol is not enabled.
jmc -J-DsocksProxyHost=localhost -J-DsocksProxyPort=7199 -J-DsocksNonProxyHosts=
On the network connection setting screen, you need to set the proxy according to the following procedure.
I used the image of ʻopenjdk: 11-jre-slim`, but when I start recording with Flight Recorder, the following error is displayed.
I'm impatient. Eh commercial function ...? Like. It's okay. This was because the above image did not contain the required libraries. By using the image of ʻopenjdk: 11-jdk`, it works normally.