批量重启脚本
时间:2010-11-03 来源:expert1
#!/bin/sh
#by expert1
# usage: restart "reportserver,p2pserver,tcast_root" of nba #ps -ef|awk '$8 ~/ch/&&$8~/reportserver/{print "kill -9 "$2}'|sh
#ps -ef|awk '$8 ~/ch/&&$8~/p2pserver/{print "kill -9 "$2}'|sh
#ps -ef|awk '$8 ~/ch/&&$8~/tcast_root/{print "kill -9 "$2}'|sh #for f in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 ;do # # 这个需要sudo来做。 cd /data/tcast_beta/ch${f};
/bin/sh /data/tcast_beta/ch${f}/reportserver.sh
/bin/sh /data/tcast_beta/ch${f}/p2pserver.sh
/bin/sh /data/tcast_beta/ch${f}/tcast_root.sh done
# usage: restart "reportserver,p2pserver,tcast_root" of nba #ps -ef|awk '$8 ~/ch/&&$8~/reportserver/{print "kill -9 "$2}'|sh
#ps -ef|awk '$8 ~/ch/&&$8~/p2pserver/{print "kill -9 "$2}'|sh
#ps -ef|awk '$8 ~/ch/&&$8~/tcast_root/{print "kill -9 "$2}'|sh #for f in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 ;do # # 这个需要sudo来做。 cd /data/tcast_beta/ch${f};
/bin/sh /data/tcast_beta/ch${f}/reportserver.sh
/bin/sh /data/tcast_beta/ch${f}/p2pserver.sh
/bin/sh /data/tcast_beta/ch${f}/tcast_root.sh done
相关阅读 更多 +