如何解释和模拟扩展的linux进程状态?

时间:2015-10-01 08:43:21

标签: linux process

这是“man proc”

输出的片段
   (3) state  %c
                    One of the following characters, indicating process state:

                    R  Running

                    S  Sleeping in an interruptible wait

                    D  Waiting in uninterruptible disk sleep

                    Z  Zombie

                    T  Stopped (on a signal) or (before Linux 2.6.33) trace stopped

                    t  Tracing stop (Linux 2.6.33 onward)

                    W  Paging (only before Linux 2.6.0)

                    X  Dead (from Linux 2.6.0 onward)

                    x  Dead (Linux 2.6.33 to 3.13 only)

                    K  Wakekill (Linux 2.6.33 to 3.13 only)

                    W  Waking (Linux 2.6.33 to 3.13 only)

                    P  Parked (Linux 3.9 to 3.13 only)

我有一段代码必须从/ proc / pid / stat读取进程状态。我想扩展它以支持新代码(t,x,K,W [waking]和P)

但是现在有了必要的改变,我不知道如何模拟这些代码。我详尽地搜索了这些状态的定义以及触发它们的条件。有人可以指出这些新代码在现实生活中的意义,以便我可以尝试模拟场景吗?

PS:调试过程时观察到了“t”。

0 个答案:

没有答案