tomcat重启、关闭、查看日志shell

来源:互联网 发布:4g网络哪家有 编辑:程序博客网 时间:2024/06/08 01:04

restart

#!/bin/shpid=`ps -ef | grep apache-tomcat-6.0.41| grep -v grep | grep -v retomcat | awk '{print $2}'`echo $pidif [ -n "$pid" ];then#echo ========kill tomcat begin==============#echo $pidkill -9 $pid#echo ========kill tomcat end==============#sleep 5#echo ===========startup.sh==============#/etc/init.d/tomcat6 restartsh /opt/apache-tomcat-6.0.41/bin/startup.shelse#echo ===========startup.sh==============#/etc/init.d/tomcat6 restartsh /opt/apache-tomcat-6.0.41/bin/startup.shfi

kill

#!/bin/shpid=`ps -ef | grep apache-tomcat-6.0.41-BDMPProxy | grep -v grep | grep -v retomcat | awk '{print $2}'`if [ -n "$pid" ]then{echo ========kill tomcat begin==============echo $pidkill -9 $pidecho ========kill tomcat end==============}fi

log

 tail -f /opt/apache-tomcat-6.0.41/logs/catalina.out;



0 0
原创粉丝点击