1234567891011121314151617181920212223242526272829 |
- #! /bin/bash
- # kill chutian nodes
- # yct
- yct_proc=$(ps -ef|grep measure_wj|grep -v grep|awk '{print $2}')
- # zzw
- zzw_proc=$(ps -ef|grep zzw|grep -v grep|awk '{print $2}')
- # huli
- #huli_proc=$(ps -ef|grep 'terminal '|grep -v grep|awk '{print $2}')
- # wk
- wk_proc=$(ps -ef|grep wk|grep -v grep|grep -v awk|awk '{print $2}')
- # bash
- bash_proc=$(ps -ef|grep bash|grep -v grep|grep -v awk|awk '{print $2}')
- # python3
- p3=$(ps -ef|grep node.py|grep -v grep|grep -v awk|awk '{print $2}')
- if [ $(echo $yct_proc|wc -L) -gt 0 -o $(echo $zzw_proc|wc -L) -gt 0 -o $(echo $huli_proc|wc -L) -gt 0 -o $(echo $wk_proc|wc -L) -gt 0 -o $(echo $bash_proc|wc -L) -gt 0 ] ; then
- echo "chutian nodes ready to kill" $yct_proc "|| " $zzw_proc "|| " $huli_proc "|| " $wk_proc "|| " $bash_proc
- kill $yct_proc $zzw_proc $wk_proc $bash_proc
- else
- echo "cannot find node to kill"
- fi
- #$huli_proc
|