1.버전정보 확인
[jboss64/bin$]./standalone.sh -v
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /home/wildfly/jboss64
JAVA: /usr/local/jdk1.8.0_152/bin/java
JAVA_OPTS: -server -XX:+UseCompressedOops -verbose:gc -Xloggc:"/home/wildfly/jboss64/standalone/log/gc.log" -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=3M -XX:-TraceClassUnloading -Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.modules.policy-permissions=true
=========================================================================
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
14:25:21,899 INFO [org.jboss.modules] (main) JBoss Modules version 1.3.6.Final-redhat-1
JBoss EAP 6.4.0.GA (AS 7.5.0.Final-redhat-21)
2.JVM heap size
[jboss64/bin$]./jboss-cli.sh --connect --controller=IP:adminPort --command="/core-service=platform-mbean/type=memory:read-attribute(name=heap-memory-usage)"
{
"outcome" => "success",
"result" => {
"init" => 1367343104L, //초기 힙사이즈
"used" => 172333032L, //사용된 힙사이즈
"committed" => 1310720000L, // used가 해당 사이즈까지 도달시, 신규메모리 공간 할당
"max" => 1310720000L //최대 힙사이즈
}
}
3.기동여부 확인
[jboss64/bin$]ps -ef | grep java | grep standalone
wildfly 6447 6327 1 14:15 pts/2 00:00:06 /usr/local/jdk1.8.0_152/bin/java -D[Standalone] -server -XX:+UseCompressedOops -verbose:gc -Xloggc:/home/wildfly/jboss64/standalone/log/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=3M -XX:-TraceClassUnloading -Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.modules.policy-permissions=true -Dorg.jboss.boot.log.file=/home/wildfly/jboss64/standalone/log/server.log -Dlogging.configuration=file:/home/wildfly/jboss64/standalone/configuration/logging.properties -jar /home/wildfly/jboss64/jboss-modules.jar -mp /home/wildfly/jboss64/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -Djboss.home.dir=/home/wildfly/jboss64 -Djboss.server.base.dir=/home/wildfly/jboss64/standalone -Djboss.server.base.dir=/home/wildfly/jboss64/standalone -Djboss.node.name=standalone -c standalone.xml -b 0.0.0.0 -bmanagement=172.21.70.24 -Djboss.socket.binding.port-offset=50
4.Service Time check : request에 대한 처리 현황을 확인합니다.
[jboss64/bin$]./jboss-cli.sh --connect --controller=IP:adminPort --command="/subsystem=web/connector=http:read-resource(recursive=true,include-runtime=true)"
{
"outcome" => "success",
"result" => {
"bytesReceived" => "0", // 요청된 Request의 Bytes
"bytesSent" => "5486", // 응답한 Response의 Bytes
"enable-lookups" => false,
"enabled" => true,
"errorCount" => "0", //에러횟수
"executor" => undefined,
"max-connections" => undefined,
"max-post-size" => 2097152,
"max-save-post-size" => 4096,
"maxTime" => "68",
"name" => "http",
"processingTime" => "72",
"protocol" => "HTTP/1.1",
"proxy-binding" => undefined,
"proxy-name" => undefined,
"proxy-port" => undefined,
"redirect-binding" => undefined,
"redirect-port" => 443,
"requestCount" => "5", //요청횟수
"scheme" => "http",
"secure" => false,
"socket-binding" => "http",
"virtual-server" => undefined,
"configuration" => undefined
}
}
5.Thread Status Check : Thread 상태를 확인합니다.
[jboss64/bin$]./jboss-cli.sh --connect --controller=IP:adminPort --command="/core-service=platform-mbean/type=threading:read-resource(include-runtime=true, recursive=true, recursive-depth=10)"
"thread-contention-monitoring-supported" => true,
"thread-cpu-time-supported" => true,
"current-thread-cpu-time-supported" => true,
"object-monitor-usage-supported" => true,
"synchronizer-usage-supported" => true,
"thread-contention-monitoring-enabled" => false,
"thread-cpu-time-enabled" => true,
"thread-count" => 65, //시스템상에서의 active thread
"peak-thread-count" => 94,
"total-started-thread-count" => 135L,
"daemon-thread-count" => 14,
"current-thread-cpu-time" => 5259440L,
"current-thread-user-time" => 0L,
"object-name" => "java.lang:type=Threading"
}
}
6.DB Connection Check : datasource 모니터링 결과를 확인합니다.
6-1.등록되어있는 datasource확인
[jboss64/bin$]./jboss-cli.sh --connect --controller=IP:adminPort --command="/subsystem=datasources:read-resource"
{
"outcome" => "success",
"result" => {
"data-source" => {
"oracleDs" => undefined, // 현재 등록되어있는 datasource
"ExampleDS" => undefined //현재 등록되어있는 datasource
},
"jdbc-driver" => {
"h2" => undefined,
"oracle" => undefined
},
"xa-data-source" => undefined
}
}
6-2.모니터링 결과를 확인하기위한 datasource별 statistics-enabled사용
[jboss64/bin$]./jboss-cli.sh --connect --controller=IP:adminPort --command="/subsystem=datasources/data-source=oracleDs:write-attribute(name=statistics-enabled,value=true)"
{
"outcome" => "success",
"response-headers" => {
"operation-requires-reload" => true,
"process-state" => "reload-required"
}
}
*처음 설정하는 경우 "outcome" => "failed" 와 함께 "response-headers" => {"process-state" => "reload-required"} 라는 메시지가 뜨며, 이 경우에는 재기동이 필요할 수 있습니다.
6-3.datasource별 모니터링 결과
[jboss64/bin$]./jboss-cli.sh --connect --controller=IP:adminPort --command="/subsystem=datasources/data-source=oracleDs/statistics=pool:read-resource(recursive=true,include-runtime=true)"
{
"outcome" => "success",
"result" => {
"ActiveCount" => "1",
"AvailableCount" => "20",
"AverageBlockingTime" => "0",
"AverageCreationTime" => "370",
"CreatedCount" => "1",
"DestroyedCount" => "0",
"InUseCount" => "0",
"MaxCreationTime" => "370",
"MaxUsedCount" => "1",
"MaxWaitCount" => "0",
"MaxWaitTime" => "0",
"TimedOut" => "0",
"TotalBlockingTime" => "0",
"TotalCreationTime" => "370",
"statistics-enabled" => true
}
}
이상으로 본 포스팅을 마치도록 하겠습니다. 서버의 상태를 확인하여 선조치 및 대응할 수 있도록 활용을 부탁드립니다.
고맙습니다.