linux進程的狀態

來源:互聯網
上載者:User

在使用ps命令的時候有一列為進程的狀態,例如

[davidp@supernova:~]$ ps u  

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND

davidp 3995 0.0 0.4 3324 1956 pts/2 Ss Aug17 0:00 /bin/bash

davidp 25049 0.0 0.8 7104 3908 pts/5 S+ Aug19 0:10 irssi

davidp 26180 0.0 0.1 2656 908 pts/0 R+ 14:41 0:00 ps u

 

其中STAT列為進程的狀態

 

The codes used are:

Code Meaning
D Uninterruptible sleep (usually IO)
R Running or runnable (on run queue)
S Interruptible sleep (waiting for an event to complete)
T Stopped, either by a job control signal or because it is being traced.
W paging (not valid since the 2.6.xx kernel)
X dead (should never be seen)
Z Defunct (“zombie”) process, terminated but not reaped by its parent.

For BSD formats and when the stat keyword is used, additional characters may be displayed:

Code Meaning
< high-priority (not nice to other users)
N low-priority (nice to other users)
L has pages locked into memory (for real-time and custom IO)
s is a session leader
l is multi-threaded (using CLONE_THREAD, like NPTL pthreads do)
+ is in the foreground process group

~~DISCUSSION~~

 

轉自:http://wiki.preshweb.co.uk/doku.php?id=linux:psflags 
 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.