proc_pid_stat(5)

๐Ÿ’– NAME ๐Ÿ’–

/proc/pid/stat โ€” status information โœจ


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

okay bestie, so this whole page (proc_pid_stat(5), from the File Formats Manual, hi ๐Ÿ‘‹) is about one little file:

/proc/pid/stat

and it's the status information about the process. ps(1) literally uses it, and it's defined in the kernel source file fs/proc/array.c ๐Ÿซถ

Here's the tea: the fields are listed below in order, each one with its proper scanf(3) format specifier. But โ€” and this is important, no cap โ€” whether certain of these fields actually show you valid information is governed by a ptrace access mode PTRACE_MODE_READ_FSCREDS | PTRACE_MODE_NOAUDIT check (go look at ptrace(2) if you wanna know more). If that check says no access, then the field value is shown as 0. Every field that can get hit by this is marked with [PT] below ๐Ÿ“Œ

like if you see a 0 and you're confused, check the [PT] tag first. it might not be a real zero, bestie, it might be a permissions thing ๐Ÿ˜ญ

Let's go field by field, in order ๐Ÿ’…


๐ŸŽ€ the fields ๐ŸŽ€

  • (1) pid %d โ€” The process ID. that's it, that's the field ๐ŸŒธ
  • (2) comm %s โ€” The filename of the executable, in parentheses. Strings longer than TASK_COMM_LEN (16) characters (including the terminating null byte) get silently truncated โ€” no warning, no drama, they just get cut ๐Ÿ”ช. This one is visible whether or not the executable is swapped out. iconic tbh โœจ
  • (3) state %c โ€” One of these characters, telling you the 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) ๐Ÿ…ฟ๏ธ
    • I โ€” Idle (Linux 4.14 onward) ๐Ÿ’ค
yes, W really does show up twice with two totally different meanings. that's a vibe, not a typo ๐Ÿ™ˆ
  • (4) ppid %d โ€” The PID of the parent of this process ๐Ÿ‘จโ€๐Ÿ‘ง
  • (5) pgrp %d โ€” The process group ID of the process ๐Ÿซ‚
  • (6) session %d โ€” The session ID of the process ๐ŸŽŸ๏ธ
  • (7) tty_nr %d โ€” The controlling terminal of the process. The minor device number is contained in the combination of bits 31 to 20 and 7 to 0; the major device number is in bits 15 to 8 ๐Ÿ”ข (yes, it's doing bit gymnastics, stay with me)
  • (8) tpgid %d โ€” The ID of the foreground process group of the controlling terminal of the process ๐ŸŒŸ
  • (9) flags %u โ€” The kernel flags word of the process. For bit meanings, see the PF_* defines in the Linux kernel source file include/linux/sched.h. Details depend on the kernel version ๐Ÿ‘‘

The format for this field was %lu before Linux 2.6.

  • (10) minflt %lu โ€” The number of minor faults the process has made which have not required loading a memory page from disk ๐Ÿงฎ
  • (11) cminflt %lu โ€” The number of minor faults that the process's waited-for children have made ๐Ÿ‘ถ
  • (12) majflt %lu โ€” The number of major faults the process has made which have required loading a memory page from disk ๐Ÿ’ฝ
  • (13) cmajflt %lu โ€” The number of major faults that the process's waited-for children have made ๐Ÿ‘ถ
  • (14) utime %lu โ€” Amount of time that this process has been scheduled in user mode, measured in clock ticks (divide by sysconf(_SC_CLK_TCK)). This includes guest time, guest_time (time spent running a virtual CPU, see below), so that applications that are not aware of the guest time field do not lose that time from their calculations. so thoughtful of it ๐Ÿฅน
  • (15) stime %lu โ€” Amount of time that this process has been scheduled in kernel mode, measured in clock ticks (divide by sysconf(_SC_CLK_TCK)) ๐Ÿง 
  • (16) cutime %ld โ€” Amount of time that this process's waited-for children have been scheduled in user mode, measured in clock ticks (divide by sysconf(_SC_CLK_TCK)). (See also times(2).) This includes guest time, cguest_time (time spent running a virtual CPU, see below) ๐Ÿ’ซ
  • (17) cstime %ld โ€” Amount of time that this process's waited-for children have been scheduled in kernel mode, measured in clock ticks (divide by sysconf(_SC_CLK_TCK)) ๐Ÿซถ
  • (18) priority %ld โ€” (Explanation for Linux 2.6) For processes running a real-time scheduling policy (policy below; see sched_setscheduler(2)), this is the negated scheduling priority, minus one; that is, a number in the range -2 to -100, corresponding to real-time priorities 1 to 99. For processes running under a non-real-time scheduling policy, this is the raw nice value (setpriority(2)) as represented in the kernel. The kernel stores nice values as numbers in the range 0 (high) to 39 (low), corresponding to the user-visible nice range of -20 to 19 ๐Ÿ”ฅ

Before Linux 2.6, this was a scaled value based on the scheduler weighting given to this process.

  • (19) nice %ld โ€” The nice value (see setpriority(2)), a value in the range 19 (low priority) to -20 (high priority). yes the low one has the big number, don't fight it, that's just how it is ๐Ÿ˜Œ
  • (20) num_threads %ld โ€” Number of threads in this process (since Linux 2.6). Before Linux 2.6, this field was hard coded to 0 as a placeholder for an earlier removed field ๐Ÿงต
  • (21) itrealvalue %ld โ€” The time in jiffies before the next SIGALRM is sent to the process due to an interval timer. Since Linux 2.6.17, this field is no longer maintained, and is hard coded as 0. it's giving retired ๐Ÿ’…
  • (22) starttime %llu โ€” The time the process started after system boot. Before Linux 2.6, this value was expressed in jiffies. Since Linux 2.6, the value is expressed in clock ticks (divide by sysconf(_SC_CLK_TCK)) โฐ

The format for this field was %lu before Linux 2.6.

  • (23) vsize %lu โ€” Virtual memory size in bytes ๐Ÿ“
  • (24) rss %ld โ€” Resident Set Size: number of pages the process has in real memory. This is just the pages which count toward text, data, or stack space. This does not include pages which have not been demand-loaded in, or which are swapped out. And heads up bestie: this value is inaccurate; see /proc/pid/statm below ๐Ÿšฉ
  • (25) rsslim %lu โ€” Current soft limit in bytes on the rss of the process; see the description of RLIMIT_RSS in getrlimit(2) ๐Ÿšง
  • (26) startcode %lu [PT] โ€” The address above which program text can run ๐Ÿ“œ
  • (27) endcode %lu [PT] โ€” The address below which program text can run ๐Ÿ“œ
  • (28) startstack %lu [PT] โ€” The address of the start (i.e., bottom) of the stack ๐Ÿฅž
  • (29) kstkesp %lu [PT] โ€” The current value of ESP (stack pointer), as found in the kernel stack page for the process ๐Ÿ‘‰๐Ÿ“
  • (30) kstkeip %lu [PT] โ€” The current EIP (instruction pointer) ๐Ÿ‘‰๐Ÿ“
  • (31) signal %lu โ€” The bitmap of pending signals, displayed as a decimal number. Obsolete, because it does not provide information on real-time signals; use /proc/pid/status instead ๐Ÿ—‘๏ธ
  • (32) blocked %lu โ€” The bitmap of blocked signals, displayed as a decimal number. Obsolete, because it does not provide information on real-time signals; use /proc/pid/status instead ๐Ÿ—‘๏ธ
  • (33) sigignore %lu โ€” The bitmap of ignored signals, displayed as a decimal number. Obsolete, because it does not provide information on real-time signals; use /proc/pid/status instead ๐Ÿ—‘๏ธ
  • (34) sigcatch %lu โ€” The bitmap of caught signals, displayed as a decimal number. Obsolete, because it does not provide information on real-time signals; use /proc/pid/status instead ๐Ÿ—‘๏ธ
all four of those? yeah, the manpage is basically telling you to go read /proc/pid/status instead. no hard feelings but that's the move ๐Ÿซถ
  • (35) wchan %lu [PT] โ€” This is the "channel" in which the process is waiting. It is the address of a location in the kernel where the process is sleeping. The corresponding symbolic name can be found in /proc/pid/wchan ๐Ÿ˜ด
  • (36) nswap %lu โ€” Number of pages swapped (not maintained) ๐Ÿšซ
  • (37) cnswap %lu โ€” Cumulative nswap for child processes (not maintained) ๐Ÿšซ
  • (38) exit_signal %d (since Linux 2.1.22) โ€” Signal to be sent to parent when we die ๐Ÿ‘‹๐Ÿ’€
  • (39) processor %d (since Linux 2.2.8) โ€” CPU number last executed on ๐Ÿ–ฅ๏ธ
  • (40) rt_priority %u (since Linux 2.5.19) โ€” Real-time scheduling priority, a number in the range 1 to 99 for processes scheduled under a real-time policy, or 0, for non-real-time processes (see sched_setscheduler(2)) โšก
  • (41) policy %u (since Linux 2.5.19) โ€” Scheduling policy (see sched_setscheduler(2)). Decode using the SCHED_* constants in linux/sched.h ๐Ÿ—บ๏ธ

The format for this field was %lu before Linux 2.6.22.

  • (42) delayacct_blkio_ticks %llu (since Linux 2.6.18) โ€” Aggregated block I/O delays, measured in clock ticks (centiseconds) โฑ๏ธ
  • (43) guest_time %lu (since Linux 2.6.24) โ€” Guest time of the process (time spent running a virtual CPU for a guest operating system), measured in clock ticks (divide by sysconf(_SC_CLK_TCK)) ๐ŸŽฎ
  • (44) cguest_time %ld (since Linux 2.6.24) โ€” Guest time of the process's children, measured in clock ticks (divide by sysconf(_SC_CLK_TCK)) ๐ŸŽฎ
  • (45) start_data %lu (since Linux 3.3) [PT] โ€” Address above which program initialized and uninitialized (BSS) data are placed ๐Ÿ“ฆ
  • (46) end_data %lu (since Linux 3.3) [PT] โ€” Address below which program initialized and uninitialized (BSS) data are placed ๐Ÿ“ฆ
  • (47) start_brk %lu (since Linux 3.3) [PT] โ€” Address above which program heap can be expanded with brk(2) ๐ŸŒฑ
  • (48) arg_start %lu (since Linux 3.5) [PT] โ€” the address above which the program's command-line arguments (argv) get placed. so like, everything above this line? that's argv territory bestie ๐Ÿ’…
  • (49) arg_end %lu (since Linux 3.5) [PT] โ€” the address below which the program's command-line arguments (argv) are placed. and bestie, put arg_start and arg_end together and you have got the whole argv zone ๐Ÿ“โœจ
  • (50) env_start %lu (since Linux 3.5) [PT] โ€” the address above which the program's environment is placed. yes the environment, the whole PATH=... situation, iconic ๐ŸŒธ
  • (51) env_end %lu (since Linux 3.5) [PT] โ€” the address below which the program's environment is placed. pair it with env_start and that's your env block, no cap ๐Ÿงš
  • (52) exit_code %d (since Linux 3.5) [PT] โ€” the thread's exit status, in the exact same form that waitpid(2) reports it. so if you've ever stared at a waitpid status and gone "what does this number MEAN" โ€” same energy, same format ๐Ÿซถ

๐ŸŒˆ SEE ALSO ๐ŸŒˆ

  • proc(5) โ€” the main character, the parent page, the whole /proc saga ๐Ÿ‘‘
  • proc_pid_status(5) โ€” the human-readable cousin, if raw numbers are giving you a headache ๐Ÿ˜ญ

and that's a wrap bestie!! ๐ŸŽ€ you just read the whole proc_pid_stat(5) page, fields 1 through 52, and honestly? ate. this slice of wisdom was served up by the Linux man-pages 6.20 girlies, dated 2026-02-08 โ€” go forth and parse /proc/*/stat responsibly, mwah ๐Ÿ’–โœจ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from
  • arch rolling: man-pages 6.20-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • nixpkgs unstable: man-pages 6.20
  • ๐Ÿ“œ the page's license: GPL-3.0-or-later
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms