结束linux 服务器系统中一个程序的多个进程

如下,当系统的多个相同的程序产生多个进程时想,而又长时间都未失效

# ps aux | grep ‘172.17.221.254‘

 2547 root     /root/cntl -h 172.17.221.254 -p

 6646 root     /root/cntl -h 172.17.221.254 -p

 9606 root     /root/cntl -h 172.17.221.254 -p

12820 root     /root/cntl -h 172.17.221.254 -p

13649 root     /root/cntl -h 172.17.221.254 -p

14331 root     /root/cntl -h 172.17.221.254 -p

17033 root     /root/cntl -h 172.17.221.254 -p

17634 root     /root/cntl -h 172.17.221.254 -p

18023 root     /root/cntl -h 172.17.221.254 -p

18139 root     /root/cntl -h 172.17.221.254 -p

19469 root     /root/cntl -h 172.17.221.254 -p

20605 root     /root/cntl -h 172.17.221.254 -p

20732 root     /root/cntl -h 172.17.221.254 -p

20873 root     /root/cntl -h 172.17.221.254 -p

24435 root     /root/cntl -h 172.17.221.254 -p

25769 root     /root/cntl -h 172.17.221.254 -p

25833 root     /root/cntl -h 172.17.221.254 -p

27156 root     /root/cntl -h 172.17.221.254 -p

27635 root     /root/cntl -h 172.17.221.254 -p

27902 root     /root/cntl -h 172.17.221.254 -p

29906 root     /root/cntl -h 172.17.221.254 -p

30845 root     /root/cntl -h 172.17.221.254 -p

31260 root     /root/cntl -h 172.17.221.254 -p

31920 root     /root/cntl -h 172.17.221.254 -p

32886 root     /root/cntl -h 172.17.221.254 -p

33634 root     /root/cntl -h 172.17.221.254 -p

33970 root     /root/cntl -h 172.17.221.254 -p

34286 root     /root/cntl -h 172.17.221.254 -p

40213 root     /root/cntl -h 172.17.221.254 -p

40307 root     /root/cntl -h 172.17.221.254 -p

41810 root     /root/cntl -h 172.17.221.254 -p

42741 root     /root/cntl -h 172.17.221.254 -p

42967 root     /root/cntl -h 172.17.221.254 -p

44219 root     /root/cntl -h 172.17.221.254 -p

44721 root     /root/cntl -h 172.17.221.254 -p

45727 root     /root/cntl -h 172.17.221.254 -p

46183 root     /root/cntl -h 172.17.221.254 -p

46594 root     /root/cntl -h 172.17.221.254 -p

48831 root     /root/cntl -h 172.17.221.254 -p

49821 root     /root/cntl -h 172.17.221.254 -p

51622 root     /root/cntl -h 172.17.221.254 -p

51766 root     /root/cntl -h 172.17.221.254 -p

51911 root     /root/cntl -h 172.17.221.254 -p

52141 root     /root/cntl -h 172.17.221.254 -p

53637 root     /root/cntl -h 172.17.221.254 -p

54877 root     /root/cntl -h 172.17.221.254 -p

54895 root     grep 172.17.221.254

56195 root     /root/cntl -h 172.17.221.254 -p

56410 root     /root/cntl -h 172.17.221.254 -p

56610 root     /root/cntl -h 172.17.221.254 -p

58340 root     /root/cntl -h 172.17.221.254 -p

60099 root     /root/cntl -h 172.17.221.254 -p

61556 root     /root/cntl -h 172.17.221.254 -p

63033 root     /root/cntl -h 172.17.221.254 -p

65027 root     /root/cntl -h 172.17.221.254 -p




可以使用以下命令来杀掉所有进程

# ps aux | grep ‘172.17.221.254‘ | awk ‘{print $1}‘ | xargs kill



本文出自 “lihongweibj” 博客,请务必保留此出处http://lihongweibj.blog.51cto.com/6235038/1619198

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。