/proc/[pid]/status Provides much of the information in /proc/[pid]/stat and /proc/[pid]/statm in a format that's easier for humans to parse. Here's an example: $ cat /proc/$$/status Name: bash State: S (sleeping) Tgid: 3515 Pid: 3515 PPid: 3452 TracerPid: 0 Uid: 1000 1000 1000 1000 Gid: 100 100 100 100 FDSize: 256 Groups: 16 33 100 VmPeak: 9136 kB VmSize: 7896 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 7572 kB VmRSS: 6316 kB VmData: 5224 kB VmStk: 88 kB VmExe: 572 kB VmLib: 1708 kB VmPMD: 4 kB VmPTE: 20 kB VmSwap: 0 kB Threads: 1 SigQ: 0/3067 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000010000 SigIgn: 0000000000384004 SigCgt: 000000004b813efb CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: ffffffffffffffff CapAmb: 0000000000000000 Seccomp: 0 Cpus_allowed: 00000001 Cpus_allowed_list: 0 Mems_allowed: 1 Mems_allowed_list: 0 voluntary_ctxt_switches: 150 nonvoluntary_ctxt_switches: 545 The fields are as follows: * Name: Command run by this process. * State: Current state of the process. One of "R (running)", "S (sleeping)", "D (disk sleep)", "T (stopped)", "T (tracing stop)", "Z (zombie)", or "X (dead)". * Tgid: Thread group ID (i.e., Process ID). * Pid: Thread ID (see gettid(2)). * PPid: PID of parent process. * TracerPid: PID of process tracing this process (0 if not being traced). * Uid, Gid: Real, effective, saved set, and filesystem UIDs (GIDs). * FDSize: Number of file descriptor slots currently allocated. * Groups: Supplementary group list. * VmPeak: Peak virtual memory size. * VmSize: Virtual memory size. * VmLck: Locked memory size (see mlock(3)). * VmPin: Pinned memory size (since Linux 3.2). These are pages that can't be moved because something needs to directly access physical memory. * VmHWM: Peak resident set size ("high water mark"). * VmRSS: Resident set size. * VmData, VmStk, VmExe: Size of data, stack, and text segments. * VmLib: Shared library code size. * VmPTE: Page table entries size (since Linux 2.6.10). * VmPMD: Size of second-level page tables (since Linux 4.0). * VmSwap: Swapped-out virtual memory size by anonymous private pages; shmem swap usage is not included (since Linux 2.6.34). * Threads: Number of threads in process containing this thread. * SigQ: This field contains two slash-separated numbers that relate to queued signals for the real user ID of this process. The first of these is the number of cur‐ rently queued signals for this real user ID, and the second is the resource limit on the number of queued signals for this process (see the description of RLIMIT_SIGPENDING in getrlimit(2)). * SigPnd, ShdPnd: Number of signals pending for thread and for process as a whole (see pthreads(7) and signal(7)). * SigBlk, SigIgn, SigCgt: Masks indicating signals being blocked, ignored, and caught (see signal(7)). * CapInh, CapPrm, CapEff: Masks of capabilities enabled in inheritable, permitted, and effective sets (see capabilities(7)). * CapBnd: Capability Bounding set (since Linux 2.6.26, see capabilities(7)). * CapAmb: Ambient capability set (since Linux 4.3, see capabilities(7)). * Seccomp: Seccomp mode of the process (since Linux 3.8, see seccomp(2)). 0 means SECCOMP_MODE_DISABLED; 1 means SECCOMP_MODE_STRICT; 2 means SECCOMP_MODE_FILTER. This field is provided only if the kernel was built with the CONFIG_SECCOMP kernel configuration option enabled. * Cpus_allowed: Mask of CPUs on which this process may run (since Linux 2.6.24, see cpuset(7)). * Cpus_allowed_list: Same as previous, but in "list format" (since Linux 2.6.26, see cpuset(7)). * Mems_allowed: Mask of memory nodes allowed to this process (since Linux 2.6.24, see cpuset(7)). * Mems_allowed_list: Same as previous, but in "list format" (since Linux 2.6.26, see cpuset(7)). * voluntary_ctxt_switches, nonvoluntary_ctxt_switches: Number of voluntary and involuntary context switches (since Linux 2.6.23).
Linux proc status man
最新推荐文章于 2024-05-30 23:32:30 发布