Linux 小写t在ps状态代码中的含义是什么
当我运行Linux 小写t在ps状态代码中的含义是什么,linux,ps,Linux,Ps,当我运行ps xaf时,我有以下输出: 因此,我的应用程序具有状态代码t+。但我找不到它的意思。在man ps中,没有此类状态代码: 它是否等于大写的T状态码?如果是这样的话,为什么我在执行kill-SIGSTOP操作时总是只获取T状态代码?并非所有版本的Linux都知道T代码。它在2.6.33中作为跟踪停止引入,与T指示的信号停止不同。在最新版本的proc(5)(2014-07-10或更高版本)中,您将发现以下内容: T Stopped (on a
ps xaf
时,我有以下输出:
因此,我的应用程序具有状态代码t+
。但我找不到它的意思。在man ps
中,没有此类状态代码:
它是否等于大写的
T
状态码?如果是这样的话,为什么我在执行kill-SIGSTOP
操作时总是只获取T
状态代码?并非所有版本的Linux都知道T
代码。它在2.6.33中作为跟踪停止引入,与T
指示的信号停止不同。在最新版本的proc(5)
(2014-07-10或更高版本)中,您将发现以下内容:
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)
除了通常的R、S、D、Z、T、W状态代码之外
查看上的最新版本。根据
任务状态数组[]
从内核源代码“t”转换为“跟踪停止”,而“t”只是“停止”
看看:
/*
* The task state array is a strange "bitmap" of
* reasons to sleep. Thus "running" is zero, and
* you can test for combinations of others with
* simple bit tests.
*/
static const char * const task_state_array[] = {
"R (running)", /* 0 */
"S (sleeping)", /* 1 */
"D (disk sleep)", /* 2 */
"T (stopped)", /* 4 */
"t (tracing stop)", /* 8 */
"X (dead)", /* 16 */
"Z (zombie)", /* 32 */
};