- manager に jmxproxy がある。
- jmx を利用して jvm や Catalina の状況を把握できる
- ${CATALINA_HOME}/server/webapps/manager : manager webアプリケーション
- ${CATALINA_HOME}/conf/Catalina/localhost/manager.xml : manager のコンテキスト.xml
- ${CATALINA_HOME}/conf/tomcat-users.xml : 情報取得時に指定するID/PW
- manager.xml に設定を追加し、接続元のIP制限をかける
- ローカルIPまたはプライベートIPのみを許可
<Context ...>
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="127.0.0.1,192.168.*.*" />
</Context>
curl -s -u {username}:{password} http://localhost:18080/manager/jmxproxy
curl -s -u {username}:{password} http://localhost:18080/manager/jmxproxy/'?qry=java.lang:type=Threading'
- CollectionCount: 31828
- CollectionTime: 335777
- ^Usage: max=12386304, used=1017720
- activeSessions: 131
- sessionCounter: 17887
- maxActive: 192
- processingTime: 55475750
- requestCount: 142484
- errorCount: 1
- max=8388608, used=5764576
- requestCount: 499749
- bytesSent: 3981849703
- processingTime: 142593924
- errorCount: 656
- max=99090432, used=10661368
- max=1486749696, used=99358648
- currentThreadsBusy: 12
- currentThreadCount: 44
- maxThreads: 200
- max=12582912, used=6073504
- DaemonThreadCount: 81
- ThreadCount: 83
- CollectionCount: 1320
- CollectionTime: 1022168
- TotalSwapSpaceSize: 2080366592
- FreeSwapSpaceSize: 2080153600
- OpenFileDescriptorCount: 108
- FreePhysicalMemorySize: 37007360
- CommittedVirtualMemorySize: 1996857344
- MaxFileDescriptorCount: 1024
- TotalPhysicalMemorySize: 2657320960
- max=121634816, used=72765224