본문 바로가기

WAS - JBoss,WildFly/각종 설정

[JBoss/WildFly] 데이터소스 pool 사용량 체크 cli 명령어

참고 글

https://access.redhat.com/solutions/268793

 

datasource_statistics.sh

#JAVA_HOME
export JAVA_HOME=/usr/jdk/jdk1.8.0_202

#---------------------------------------------------------------------------

#server_properties
JBOSS_HOME=/app/jboss/jboss-eap-7.4
IP_ADDRESS=192.168.55.169
MANAGEMENT_PORT=9100

#---------------------------------------------------------------------------

#datasource_name
DATASOURCE_NAME=test_datasource

#---------------------------------------------------------------------------

#command
$JBOSS_HOME/bin/jboss-cli.sh --connect --controller=$IP_ADDRESS:$MANAGEMENT_PORT --command="/subsystem=datasources/data-source=$DATASOURCE_NAME/statistics=pool:read-resource(include-runtime=true)"