#!/bin/sh
CONTROLLER_IP=127.0.0.1
CONTROLLER_PORT=9999
DATE=`date +%Y%m%d%H%M%S`
echo "###DATE: " $DATE
echo "#################SERVER-STATE####################"
$JBOSS_HOME/bin/jboss-cli.sh --connect --controller=$CONTROLLER_IP:$CONTROLLER_PORT --command=:"read-attribute(name=server-state)" |grep result |tr -d ' ' |tr -d '"' |tr '=>' ': ' |tr -d ','
echo ""
echo "###################THREAD-STATE##################"
$JBOSS_HOME/bin/jboss-cli.sh --connect --controller=$CONTROLLER_IP:$CONTROLLER_PORT --command="/core-service=platform-mbean/type=threading:read-resource" |grep daemon-thread-count |tr -d ' ' |tr -d '"' |tr '=>' ': ' |tr -d ','
echo ""
echo "##################HEAP-STATE#####################"
$JBOSS_HOME/bin/jboss-cli.sh --connect --controller=$CONTROLLER_IP:$CONTROLLER_PORT --command="/core-service=platform-mbean/type=memory :read-attribute(name=heap-memory-usage)" |grep max |tr -d ' ' |tr -d '"' |tr '=>' ': ' |tr -d ','
$JBOSS_HOME/bin/jboss-cli.sh --connect --controller=$CONTROLLER_IP:$CONTROLLER_PORT --command="/core-service=platform-mbean/type=memory :read-attribute(name=heap-memory-usage)" |grep used |tr -d ' ' |tr -d '"' |tr '=>' ': ' |tr -d ','
echo ""
echo "##############DATASOURCE-STATE###################"
echo "#DATASOURCE1"
$JBOSS_HOME/bin/jboss-cli.sh --connect --controller=$CONTROLLER_IP:$CONTROLLER_PORT --command="/subsystem=datasources/data-source=ExampleDS/statistics=pool :read-resource(recursive=true, include-runtime=true)" |grep ActiveCount |tr -d ' ' |tr -d '"' |tr '=>' ': ' |tr -d ','
echo ""
echo "###########Connection-STATE######################"
lsof -u jboss |grep TCP |grep ajp| wc -l
echo ""
echo "#################################################"
'일 > WAS' 카테고리의 다른 글
JBoss EAP 5.2 slimming / 제이보스 슬리밍 (0) | 2019.11.28 |
---|---|
특정 계정에서 사용중인 TCP 개수 (0) | 2019.11.28 |
JBoss EAP6 글로벌 모듈 설정 (0) | 2019.11.28 |
아파치 제이보스 directory listing (0) | 2019.11.28 |
JBoss DataSource 모니터링 (0) | 2019.11.28 |