티스토리 뷰
반응형
#!/bin/sh
PRO_NAME="websphere"
set -A WAS_LIST1 \
Container명1 \
Container명2 \
Container명3 \
Container명4 \
Container명5
set -A WAS_LIST2 \
"Maganer" \
"Container명1 WAS" \
"Container명2 WAS" \
"Container명3 WAS" \
"Container명4 WAS"
echo
echo "------------ WAS Process Check Start ------------"
i=0
for n in ${WAS_LIST1[@]}
do
PS_CNT= `ps -ef | awk '{ AA ="whoami"; AA | getline BB; close(AA); if($1 == BB) print}' | grep ${PRO_NAME} | grep "${n}$" | wc -l | tr -d " "`
if [ ${PS_CNT} -eq 1 ]
then
print "%-22s%3s%s\n" "${WAS_LIST2[$i]} " " : " "[ OK ]"
else
echo "\033[5m\c"
printf "%-22s%3s%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 -----------"
i = 0
for n in ${WAS_LIST1[@]}
do
if [ `/APP/websphere/AppServer/bin/serverStatus.sh ${n} | grep STARTED | wc -l` -eq 1 ]
then
printf "%-22s%3%10s\n" "${WAS_LIST2[$i]} " " : " " [ OK ]"
else
echo "\033[5m\c"
printf "%-22s%3s%10s\n" "${WAS_LIST2[$i]} " " : " " [ NOT OK ]"
echo "\033[0m\c"
echo "Type for check : /APP/websphere/AppServer/bin/serverStatus.sh ${n}"
fi
i=$((${i}+1))
done
echo "------------ Container Check End -------------"
echo
###### WEB Server status Check Start ########
echo "------------WEB Service Check Start --------------"
if [ `/APP/websphere/AppServer/bin/serverStatus.sh webserver1 | grep RUNNING | wc -l` -eq 1 ]
then
printf "%-22s%3s%10s\n" "webserver1" " : " "[ OK ]"
else
echo "\033[5m\c"
printf "%-22s%3%10s\n" "webserver1" " : " "[ NOT OK ]"
echo "\033[0m\c"
echo "Type for check : /APP/websphere/AppServer/bin/serverStatus.sh webserver1"
fi
echo "------------ WEB Service 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 |
JEUS6이하 점검 SCRIPT (0) | 2023.11.16 |
[JEUS] 애플리케이션 설정 및 개발 시 문제점 정리 (0) | 2023.09.14 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- thymeleaf
- Spring
- 취업리부트코스
- 글또
- Comparable
- dxdy
- 재기동
- 객체정렬
- 코드트리
- 회고록
- 전자정부프레임워크
- 챗봇
- springboot
- JWT
- 개발자취준
- RASA
- 항해99
- 백준
- Comparator
- BufferedWriter
- 취리코
- BufferedReader
- Java
- 유데미
- 자바
- NLU
- 코딩테스트
- script
- 나만의챗봇
- BFS
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함
반응형