开发者

How to determine weblogic server startup?

开发者 https://www.devze.com 2023-03-26 11:17 出处:网络
I am trying to write a script th开发者_如何学Cat will run and send a notification email regarding a successful server restart, however, how should i do so in the best way?

I am trying to write a script th开发者_如何学Cat will run and send a notification email regarding a successful server restart, however, how should i do so in the best way?

Weblogic 8.1


Probably not the best way, but assuming you are working in a Linux/Unix environment you could try this script. This will watch your Weblogic start up script for a keyword (I chose "in RUNNING mode").

COUNTER=0
while [ $COUNTER -le 5 ]
do
 grep "started in RUNNING mode" <full path and name of log file>
 if [ $? -eq 0 ];
 then
      mail -s 'Server started' your_email@mail.com </dev/null
      break
 fi
 COUNTER=`expr $COUNTER + 1`
 sleep 6
done
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号