如何以root暫停user的工作? - Linux

Table of Contents


linux 底下,我知道可以用Ctrl+z來暫停工作,然

後用fg jobs來重新啟動。但如果是root,要怎麼暫停

某一個特定工作了(如果知道PID),又如何重啟呢?

先感謝各位了!


(root 都可以kill某一個特定工作,暫停應該是可以達到的吧。)


自問自答一下,在以下網頁,找到了方法。
http://www.comptechdoc.org/os/linux/usersguide/linux_ugprocesses.html

節錄自上方網址,
kill -STOP 1721 Stops (suspends) process 1721 by sending
the STOP signal to the process. This process
will still be on the task list. The process
can't catch or ignore the STOP signal.

kill -CONT 1721 Continue process 1721 causing it to resume.
The CONT signal is sent to the process.

現在產生一個新的問題,我要怎麼查詢有哪些工作是被stop,然後其pid為何?

在usr使用下,jobs就可以查詢了。但現在是root,怎麼知道有哪些工作是在stop

狀態?不然,若是把工作stop後,要如何把它回覆。

--

All Comments

Thomas avatarThomas2010-03-22
ps aux | grep [userid] 之後s代表進行中 T代表停止
Barb Cronin avatarBarb Cronin2010-03-24
了解,感謝樓上