localhost: MacOS11.6
remote server: run a centos7 server in vmware
use MacOS monitoring remote server, remote server open a port to show server`s heap
First, init localhostinstall visualVM and jdk in Mac
jdk version is 17.0.1, just install dmg, the package name like this: jdk-17_macos-x64_bin.dmg
visualVM version just install dmg again, like this VisualVM_211.dmg:
reference documentation visualvm: https://visualvm.github.io/download.html jdk: https://docs.oracle.com/en/java/javase/15/install/installation-jdk-macos.html#GUID-F575EB4A-70D3-4AB4-A20E-DBE95171AB5FSecond, init the remote server
install logstash for rpm:
wget https://artifacts.elastic.co/downloads/logstash/logstash-7.16.2-x86_64.rpm && rpm -ivh logstash-7.16.2-x86_64.rpm
set JAVA_HOME:
sudo vim /etc/profile export JAVA_HOME=/usr/share/logstash/jdk export PATH=$JAVA_HOME/bin:$PATH export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib source /etc/profile java -versionrun logstash in the remote server
systemctl start logstashrun jstatd in the remote server
# add two lines in java.policy cp /usr/share/logstash/jdk/conf/security/java.policy ~/java.policy cat >> ~/java.policy <open visualVM in Mac create remote server in visualVM, just enter the remote ip
a bug
and then, you will see
no cpu monitoring…



