html tool

2021年12月21日星期二

转:linux暂停和恢复进程

 https://blog.csdn.net/Tim_phper/article/details/53536621

、使用kill -STOP 命令将该进程暂停:

[root@vps ~]# kill -STOP 18900
  • 1

再观察其状态:

[root@vps ~]# ps aux|grep tar
root 18900 1.4 0.4 2816 1120 pts/1 T 09:23 0:00 tar zcf usr.tar.gz usr/
  • 1
  • 2

此刻进程处于暂停状态了(T)

3、使用kill -CONT恢复进程执行

[root@vps ~]# kill -CONT 18900
[root@vps ~]# ps aux|grep tar
root     18900  1.5  0.4   2816  1128 pts/1    R    09:39   0:00 tar zcf usr.tar.gz usr/
  • 1
  • 2
  • 3

进程恢复运行状态(R)

没有评论:

发表评论