티스토리 뷰
반응형
#!/bin/ksh
OWN_ID="유저명"
PRO_NAME="jeus"
if [ `whoami` != ${OWN_ID} ]
then
echo "Change User to ${OWN_ID}"
exit
fi
set -A WAS_LIST1 \
jeus.server.JeusBootStrapper \
DadminServer \
Dnodemanager \
D컨테이너명
set -A WAS_LIST2 \
Admin \
NodeManager \
"컨테이너명 WAS"
#### WAS Status check ####
echo
echo " ----------- WAS Process Check Start -------------- "
i=0
for n in ${WAS_LIST1[@]}
do
PS_CNT=`ps -ef | awk '{ if( $1 == "'"${OWN_ID}"'" ) print }' | grep ${PRO_NAME} | grep "${n}" | grep -v grep | wc -l | tr -d " "`
if [ ${PS_CNT} -eq 운영중인 WAS 개수 ]
then
printf "%-22s%3s%s\n" "${WAS_LIST2[$i]} " " : " "[ OK ]"
else
echo "\033[5m\c"
printf "%-22s%s%s\n" "${WAS_LIST2[$i]} " " : " "[ NOT OK ]"
echo "\033[0m\c"
fi
i=$((${i}+1))
done
echo "---------------- WAS Process Check End ----------------- "
echo
echo "---------------- Container Check Start ----------------- "
AAA(){
echo "si"
echo "exit"
}
OK_CNT=` AAA | /APP/jeus7/bin/dsa | grep RUNNING | wc -l | tr -d " "`
if [ ${OK_CNT} -eq 운영중인 컨테이너 개수 ]
then
printf "%-22s%3s%s\n" "Container Status" " : " "[ OK ]"
else
echo "\033[5m\c"
printf "%-22s%3%s\n" "Container Status" " : " "[ NOT OK ]"
echo "\033[0m\c"
echo "type for check : echo si | /APP/jeus7/bin/dsa"
fi
echo "---------------- Container Check End ----------------- "
echo
echo "---------------- Application Check Start ----------------- "
AAA(){
echo "appinfo"
echo "exit"
}
OK_CNT=` AAA | /APP/jeus7/bin/dsa | grep RUNNING | wc -l | tr -d " "`
if [ ${OK_CNT} -eq 실행중인 어플리케이션 개수 ]
then
printf "%-22s%3s%s\n" "Application Status" " : " "[ OK ]"
else
echo "\033[5m\c"
printf "%-22s%3s%s\n" "Application Status" " : " "[ NOT OK ]"
echo "\033[0m\c"
echo "type for check : echo appinfo | /APP/jeus7/bin/dsa"
fi
echo "---------------- Application Check End ----------------- "
echo
echo "---------------- Web Server Container Check Start ----------------- "
AAA(){
echo "st -server 컨테이너명 -t"
echo "exit"
}
OK_CNT=`AAA | /APP/jeus7/bin/dsa | grep webtob1`
if [ `echo ${OK_CNT1} | awk '{print $4}'` -gt | 1 ]
then
printf "%-22s%3s%s\n" "Web Con Status" " : " "[ OK ]"
else
echo "\033[5m\c"
printf "%-22s%3s%s\n" "Web Con Status" " : " "[ NOT OK ]"
echo "\033[0m\c"
echo "type for check : echo st -server 컨테이너명 -t | /APP/jeus7/bin/dsa "
fi
echo "---------------- Web Server Container Check End ----------------- "
echo
###### WEB Status Check ######
echo "---------------- Web Server Check Start ----------------- "
set -A WEB_STATUS_OK `/APP/jeus7/bin/wsadmin -C si | grep -w RDY | awk '{print $2}'`
set -A WEB_STATUS_NOK `/APP/jeus7/bin/wsadmin -C si | grep -w NRDY | awk '{print $2}'`
OK_CNT=`echo ${WEB_STATUS_OK[@]} | wc -w | tr -d " "`
NOK_CNT=`echo ${WEB_STATUS_NOK[@]} | wc -w | tr -d " "`
i=0
if [ ${OK_CNT} -gt 0 ]
then
for n in ${WEB_STATUS_OK[@]}
do
printf "%-22s%3s%10s\n" "${WEB_STATUS_OK[$i]} " " : " "[ OK ]"
i=$((${i}+1))
done
fi
if [ ${OK_NCNT} -gt 0 ]
then
for n in ${WEB_STATUS_NOK[@]}
do
echo "\033[5m\c"
printf "%-22s%3s%10s\n" "${WEB_STATUS_NOK[$i]} " " : " "[ NOT OK ]"
echo "\033[0m\c"
echo "type for check : /APP/jeus7/bin/wsadmin -C si"
i=$((${i}+1))
done
fi
echo "---------------- Web Server Check End ----------------- "
echo
반응형
'Architecture > WAS' 카테고리의 다른 글
[Tomcat] catalina.out 날짜별 분기 작업(feat. rotatelog) (0) | 2024.02.27 |
---|---|
[JEUS] The server shutdown failed and a timeout occurred. shutdown timeout[120000 ms] 원인 분석과 해결방안 (1) | 2024.01.01 |
JEUS6이하 점검 SCRIPT (0) | 2023.11.16 |
Websphere(Incl. IHS) 점검 script (0) | 2023.11.16 |
[JEUS] 애플리케이션 설정 및 개발 시 문제점 정리 (0) | 2023.09.14 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 코드트리
- JWT
- BFS
- NLU
- script
- 자바
- 항해99
- Java
- 전자정부프레임워크
- 회고록
- BufferedWriter
- 백준
- 취업리부트코스
- Spring
- 챗봇
- 글또
- BufferedReader
- Comparable
- dxdy
- thymeleaf
- springboot
- 객체정렬
- 코딩테스트
- 개발자취준
- 나만의챗봇
- 유데미
- RASA
- 재기동
- Comparator
- 취리코
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
글 보관함
반응형