Linux教程

Linux:命令:ps、进程状态

本文主要是介绍Linux:命令:ps、进程状态,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

进程状态说明

关于不可中断的休眠的解释
https://eklitzke.org/uninterruptible-sleep
https://lwn.net/Articles/288056/

进程状态代码:下面是s, stat 和 state 输出的限定词 specifiers (表头"STAT" or "S"):
     D    uninterruptible sleep (usually IO) 、不可中断休眠,一般是 IO操作
     I    Idle kernel thread,空闲内核线程
     R    running or runnable (on run queue),正在运行,或者可以运行(已经在可运行队列里了)
     S    interruptible sleep (waiting for an event to complete),可被打断的休眠(正在等待一个事件的结束)
     T    stopped by job control signal ,job控制信号中止的线程
     t    stopped by debugger during the tracing;跟踪器停止的进程
     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:
               <    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
这篇关于Linux:命令:ps、进程状态的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!