分享

/proc/pid/status

 果果许 2012-04-19

/proc/pid/status

The /proc/pid/status file contains various information about the status of a process with the specified PID.

It is a text file with multiple lines; each line has form name:value (with extra spaces for better readability). Sometimes, the value is a whitespace-separated list.

The values are as follows (the list applies for kernel version 2.6.30; newer kernels can have more items but should always provide the ones described below):

Value name Meaning
Name Filename (not the complete path[1] of the executable being run by the process.
State Process state as a single character (D/R/S/T/Z)
Tgid Thread group ID, equal to the PID of the process (and this is also the TID of the first thread started in the process).
Pid PID, equal to TGID.
PPid PID of the parent process.
TracerPid PID of process tracing this process (0 if the process is not traced).
Uid Set of four UIDs: real, effective, saved, filesystem.
Gid Set of four GIDs: real, effective, saved, filesystem.
FDSize Number of file descriptors in use.
Groups List of GIDs of supplementary groups.
VmPeak Peak size of the virtual memory of the process.
VmSize Current total size of the virtual memory.
VmLck Size of locked memory.
VmHWM Peak size of the resident set ("high water mark").
VmRSS Current size of the resident set.
VmData Size of the data segment.
VmStk Size of the stack segment.
VmExe Size of the executable ("text") segment.
VmLib Size of shared libraries loaded by this process (and possibly shared with others).
VmPTE Size of page table entries (number of swap entries).
VmSwap Size of swap space used by this process.
Threads Number of threads.
SigQ Two values separated by "/": Current number of queued signals/maximum allowed number of queued signals.
SigPnd A bitmap (as a hexadecimal value) of pending signals for the thread[2] whose TID == TGID == PID.
ShdPnd A bitmap (as a hexadecimal value) of pending signals targeted on the whole process.
SigBlk A bitmap (as a hexadecimal value) of blocked signals for the thread whose TID == TGID == PID.
SigIgn A bitmap (as a hexadecimal value) of ignored signals (per-process).
SigCgt A bitmap (as a hexadecimal value) of signals a signal handler is installed for (per-process).
CapInh The inheritable capability set (a bitmap shown as a hexadecimal value).
CapPrm The permitted capability set (a bitmap shown as a hexadecimal value).
CapEff The effective capability set (a bitmap shown as a hexadecimal value).
CapBnd The bounding capability set (a bitmap shown as a hexadecimal value).
Cpus_allowed A bitmap (as a hexadecimal value) of CPUs where the process may run.
Cpus_allowed_list A list of CPU numbers where the process may run (same information as Cpus_allowed).
Mems_allowed A bitmap (as a hexadecimal value) of memory nodes the process can use.
Mems_allowed_list A list of memory nodes the process can use (same information as Mems_allowed).
voluntary_ctxt_switches Number of voluntary context switches.
nonvoluntary_ctxt_switches Number of involuntary context switches.

[edit] Notes

  1. See /proc/pid/exe to obtain the complete path of the executable.
  2. Information for every thread in the process can be found in the /proc/pid/task directory.

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多