如何在Solaris上检查进程是否不可中断

时间:2012-10-20 08:38:41

标签: process operating-system solaris ps

如果进程处于不间断睡眠模式,Solaris 11g上的哪个ps选项会提供信息?

admin@starsut:/tmp$ ps -aef | grep java
UID   PID  PPID   C    STIME TTY         TIME CMD
oracle  1465  1462   0   Oct 13 ?          18:10 /oracle/product/11.2.0/db_1/jdk/bin/sparcv9/java -server -Xmx384M -XX:MaxPermSi
admin 15701 15680   0   Oct 19 ?        2403:01 /wls/bin/middleware/jdk160_29/bin/java -client -Xms1024m -Xmx2048m -XX:MaxPermS
admin 29778  1943   0 13:05:44 ?           0:15 /wls/bin/middleware/jdk160_29/bin/java -classpath /wls/bin/middleware/patch_wls
admin 28733  1943   0 12:51:49 ?           0:15 /wls/bin/middleware/jdk160_29/bin/java -classpath /wls/bin/middleware/patch_wls
admin 29122  1943   0 12:56:03 ?           0:15 /wls/bin/middleware/jdk160_29/bin/java -classpath /wls/bin/middleware/patch_wls
admin 13115 11818   0 16:10:39 pts/8       0:00 grep java

我找不到任何指示进程的选项(处于“D”状态)。

请告知是否有这样的旗帜。

编辑:删除linux标志

1 个答案:

答案 0 :(得分:2)

Solaris中没有这样的进程状态“D”。来源:

  1. ps(1)手册页(状态:O,S,R,T,W,Z)

  2. pflagspflags.c(OpenSolaris)(ASLEEP似乎最接近Linux的S,而不是D

  3. <sys/proc.h>usr/src/uts/common/sys/proc.h(再次使用OpenSolaris):

    #define SSLEEP  1       /* awaiting an event */
    #define SRUN    2       /* runnable */
    #define SZOMB   3       /* process terminated but not waited for */
    #define SSTOP   4       /* process stopped by debugger */
    #define SIDL    5       /* intermediate state in process creation */
    #define SONPROC 6       /* process is being run on a processor */
    #define SWAIT   7       /* process is waiting to become runnable */