티스토리 뷰
반응형
#!/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 \
D컨테이너명
set -A WAS_LIST2 \
Admin \
"컨테이너명 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 "conlist"
echo "exit"
}
OK_CNT=` AAA | /APP/jeus6/bin/ja | grep -E "컨테이너명1|컨테이너명2" | grep READY | 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 conlist | /APP/jeus6/bin/ja"
fi
echo "---------------- Container Check End ----------------- "
echo
echo "---------------- Application Check Start ----------------- "
AAA(){
echo "applist"
echo "exit"
}
OK_CNT=` AAA | /APP/jeus6/bin/ja | grep -E "컨테이너명1|컨테이너명2" | 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 applist | /APP/jeus6/bin/ja"
fi
echo "---------------- Application Check End ----------------- "
echo
echo "---------------- Web Server Check Start ----------------- "
AAA(){
echo "st -con 컨테이너명 -t"
echo "exit"
}
OK_CNT1=`AAA | /APP/jeus6/bin/ja | sed -n '/webtob1/,/current/p' | grep "current"`
OK_CNT2=`AAA | /APP/jeus6/bin/ja | sed -n '/webtob3/,/current/p' | grep "current"`
if [ `echo ${OK_CNT1} | awk '{print $6}'` -gt | 1 ] && [ `echo ${OK_CNT2} | awk '{print %6}'` -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 -con 컨테이너명 -t | /APP/jeus6/bin/ja "
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 |
JEUS 7 이상(Incl. webtob) 점검 SCRIPT (0) | 2023.11.16 |
Websphere(Incl. IHS) 점검 script (0) | 2023.11.16 |
[JEUS] 애플리케이션 설정 및 개발 시 문제점 정리 (0) | 2023.09.14 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- Comparator
- 취업리부트코스
- 챗봇
- 개발자취준
- thymeleaf
- NLU
- Java
- 글또
- 객체정렬
- dxdy
- BFS
- Comparable
- 회고록
- 전자정부프레임워크
- 취리코
- script
- springboot
- 백준
- 코딩테스트
- 코드트리
- 유데미
- JWT
- 재기동
- BufferedWriter
- 나만의챗봇
- Spring
- 항해99
- BufferedReader
- RASA
- 자바
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함
반응형