对于挂死的进程 怎么杀死呀 脚本kill好像不管用的呀

wtf      10445 10427  0 00:26 ?        00:00:00 sqlldr userid=zjnoap/noap@orcl control=/home/wtf/ctrlfile/gaexinfo.ctl data=gaexinfo_201106090025.csv DIRECT=TRUE parallel=TRUE skip_index_maintenance=TRUE resumable_timeout=60 log=/home/wtf/dbout/gaexinfo_201106090025.out bad=/home/wtf/dbout/gaexinfo_201106090025.bad
wtf      10449 10433  0 00:26 ?        00:00:00 sqlldr userid=zjnoap/noap@orcl control=/home/wtf/ctrlfile/gacc.ctl data=gacc_201106090024.csv DIRECT=TRUE parallel=TRUE skip_index_maintenance=TRUE resumable_timeout=60 log=/home/wtf/dbout/gacc_201106090024.out bad=/home/wtf/dbout/gacc_201106090024.bad
wtf      10451 10435  0 00:26 ?        00:00:00 sqlldr userid=zjnoap/noap@orcl control=/home/wtf/ctrlfile/gapaging.ctl data=gapaging_201106090023.csv DIRECT=TRUE parallel=TRUE skip_index_maintenance=TRUE resumable_timeout=60 log=/home/wtf/dbout/gapaging_201106090023.out bad=/home/wtf/dbout/gapaging_201106090023.bad
wtf      10458 10444  0 00:26 ?        00:00:00 sqlldr userid=zjnoap/noap@orcl control=/home/wtf/ctrlfile/mr.ctl data=abis_call_mr_201106090021.csv DIRECT=TRUE parallel=TRUE skip_index_maintenance=TRUE resumable_timeout=60 log=/home/wtf/dbout/abis_call_mr_201106090021.out bad=/home/wtf/dbout/abis_call_mr_201106090021.bad
wtf      10459 10447  0 00:26 ?        00:00:00 sqlldr userid=zjnoap/noap@orcl control=/home/wtf/ctrlfile/sd.ctl data=abis_sd_cdr_201106090024.csv DIRECT=TRUE parallel=TRUE skip_index_maintenance=TRUE resumable_timeout=60 log=/home/wtf/dbout/abis_sd_cdr_201106090024.out bad=/home/wtf/dbout/abis_sd_cdr_201106090024.bad
wtf      10558 10546  0 00:27 ?        00:00:00 sqlldr userid=zjnoap/noap@orcl control=/home/wtf/ctrlfile/gaexinfo.ctl data=gaexinfo_201106090025.csv DIRECT=TRUE parallel=TRUE skip_index_maintenance=TRUE resumable_timeout=60 log=/home/wtf/dbout/gaexinfo_201106090025.out bad=/home/wtf/dbout/gaexinfo_201106090025.bad
wtf      10565 10552  0 00:27 ?        00:00:00 sqlldr userid=zjnoap/noap@orcl control=/home/wtf/ctrlfile/gapaging.ctl data=gapaging_201106090025.csv DIRECT=TRUE parallel=TRUE skip_index_maintenance=TRUE resumable_timeout=60 log=/home/wtf/dbout/gapaging_201106090025.out bad=/home/wtf/dbout/gapaging_201106090025.bad
wtf      10570 10559  0 00:27 ?        00:00:00 sqlldr userid=zjnoap/noap@orcl control=/home/wtf/ctrlfile/gacc.ctl data=gacc_201106090024.csv DIRECT=TRUE parallel=TRUE skip_index_maintenance=TRUE resumable_timeout=60 log=/home/wtf/dbout/gacc_201106090024.out bad=/home/wtf/dbout/gacc_201106090024.bad
wtf      10579 10569  0 00:27 ?        00:00:00 sqlldr userid=zjnoap/noap@orcl control=/home/wtf/ctrlfile/mr.ctl data=abis_call_mr_201106090025.csv DIRECT=TRUE parallel=TRUE skip_index_maintenance=TRUE resumable_timeout=60 log=/home/wtf/dbout/abis_call_mr_201106090025.out bad=/home/wtf/dbout/abis_call_mr_201106090025.bad
wtf      10580 10568  0 00:27 ?        00:00:00 sqlldr userid=zjnoap/noap@orcl control=/home/wtf/ctrlfile/sd.ctl data=abis_sd_cdr_201106090024.csv DIRECT=TRUE parallel=TRUE skip_index_maintenance=TRUE re

作者: pengjunhui2012   发布时间: 2011-06-09

ps -ef | grep sqlldr  | awk '$3 ~ /[0-9]+/ {print $3}' | while read s; do kill -9  $s;  done

作者: pengjunhui2012   发布时间: 2011-06-09

上面的这个脚本好像杀不了呀 求高手指点的呀

作者: pengjunhui2012   发布时间: 2011-06-09

为何杀父进程呢
杀本身进程就可以了吧
另应该过滤掉本语句本身的进程grep -v grep,若先杀掉了自己,还怎么去杀其他的呢

作者: shplpy   发布时间: 2011-06-09

楼上的大神帮忙改一下我的呀 ~~~

作者: pengjunhui2012   发布时间: 2011-06-09

ps axu |grep -v 'grep' |egrep "sqlldr"|awk '{system("kill -9 "$2)}'

试一下吧

作者: shplpy   发布时间: 2011-06-09

ok ths~~~

作者: pengjunhui2012   发布时间: 2011-06-09