서버 모니터링 툴 Jconsole
Jconsole이란?
실행 중인 자바 프로세스 모니터링 가능.
The JConsole graphical user interface is a monitoring tool that complies to the Java Management Extensions (JMX) specification. JConsole uses the extensive instrumentation of the Java Virtual Machine (Java VM) to provide information about the performance and resource consumption of applications running on the Java platform.
In the Java Platform, Standard Edition (Java SE platform) 6, JConsole has been updated to present the look and feel of the Windows and GNOME desktops (other platforms will present the standard Java graphical look and feel). The screen captures presented in this document were taken from an instance of the interface running on Windows XP.
출처 : https://docs.oracle.com/javase/7/docs/technotes/guides/management/jconsole.html
Using JConsole - Java SE Monitoring and Management Guide
Chapter 3 Using JConsole The JConsole graphical user interface is a monitoring tool that complies to the Java Management Extensions (JMX) specification. JConsole uses the extensive instrumentation of the Java Virtual Machine (Java VM) to provide informatio
docs.oracle.com
모니터링 당하는 서버에서 할 일
-
아파치 톰캣 설치
-
apache-tomcat-9.0.14 기준
-
CentOS 6 기준
-
-
원격 접속을 위한 포트 및 IP 설정
-
%CATALINA_HOME%/bin/setenv.sh에서 아래 내용 추가
-
CATALINA_OPTS="$JPDA_OPTS $CATALINA_OPTS
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=포트
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Djava.rmi.server.hostname=원격 접속 IP"
-
혹시 모르는 아파치 톰캣 재시작
-
포트 정상적으로 열린거 확인
-
netstat -tnl | grep 지정한 포트 넘버
[root@ozreport8forCentOs6 bin]# netstat -tnl | grep nnnn tcp 0 0 :::nnnn :::* LISTEN
-
모니터링 실행하는 pc에서 할 일
- jdk 다운로드
아니 jre 다운받았는데 jconsole이 없는겨... 당황했잖아... 그래서 그냥제일 큰 jdk 다운- jdk 12 기준
- jconsole 실행
- jdk 설치 디렉토리/bin/jconsole.exe
- 아까 설치한 IP랑 포트를 Remote Process에 입력
4. ssl 사용안하는 설정해서 이런 창 뜰 수는 있음
- 무시하고 'Insecure connection' 클릭!
5. 연결 성공!