任务状态PA指的是什么?

任务状态PA指的是什么?

我正在研究 RHEL 7.4 的故障转储。它显示一些任务状态为 PA。对于命令 -crash> ps | grep sample

 - 31718  31717   3  ffff8806873a6eb0  **PA**   0.0   42260   8040  sample  
 - 32027  32025   3  ffff880462cf1fa0  **PA**   0.0   42260   8036  sample
 - 32148  32146   5  ffff88081b75eeb0  **PA**   0.0   42260   8036  sample
 - 32620  32618   0  ffff8802b1469fa0  **PA**   0.0   42260   8036  sample

没有任何帮助页面谈论此任务状态的详细信息。

  • 谁能告诉我PA指的任务状态是什么?
  • 有关崩溃实用程序中提到的所有进程状态的任何链接或详细信息?
crash> help ps |grep PA

 - the task state (RU, IN, UN, ZO, ST, TR, DE, SW, WA, PA).**

答案1

http://people.redhat.com/anderson/crash_sources/task.c

char *
task_state_string(ulong task, char *buf, int verbose)
{
long state;
int exclusive;
int valid, set;

if (_RUNNING_ == TASK_STATE_UNINITIALIZED) 
    initialize_task_state();

if (verbose)
    return task_state_string_verbose(task, buf);

if (buf)
    sprintf(buf, verbose ? "(unknown)" : "??");

state = task_state(task);

set = valid = exclusive = 0;
if (valid_task_state(_EXCLUSIVE_)) {
    exclusive = state & _EXCLUSIVE_;
    state &= ~(_EXCLUSIVE_);
}

if (state == _RUNNING_) {
    sprintf(buf, "RU"); 
    valid++;
}

if (state & _INTERRUPTIBLE_) { 
    sprintf(buf, "IN"); 
    valid++; 
    set++;
}

if (state & _UNINTERRUPTIBLE_) {
    if (valid_task_state(_NOLOAD_) &&
        (state & _NOLOAD_))
        sprintf(buf, "ID");
    else
        sprintf(buf, "UN");
    valid++; 
    set++;
}

if (state & _ZOMBIE_) {
    sprintf(buf, "ZO"); 
    valid++; 
    set++;
}

if (state & _STOPPED_) {
    sprintf(buf, "ST"); 
    valid++; 
    set++;
}

if (valid_task_state(_TRACING_STOPPED_) &&
    (state & _TRACING_STOPPED_)) {
    sprintf(buf, "TR"); 
    valid++; 
    set++;
}

if (state == _SWAPPING_) {
    sprintf(buf, "SW"); 
    valid++; 
    set++;
}

if ((state & _DEAD_) && !set) {
    sprintf(buf, "DE"); 
    valid++; 
    set++;
}

if (state == _PARKED_) {
    sprintf(buf, "PA"); 
    valid++;
}

if (state == _WAKING_) {
    sprintf(buf, "WA"); 
    valid++;
}

if (state == _NEW_) {
    sprintf(buf, "NE");
    valid++;
}

if (valid && exclusive) 
    strcat(buf, "EX");

return buf;

}

答案2

该状态指的是停车状态。此状态仅对 3.9 到 3.13 之间的内核有效。按照男人页:

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)

这种状态也称为不间断睡眠。参考链接了解更多详情。

相关内容