]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man5/proc_pid_stat.5
proc_pid_mountinfo.5: spfix
[thirdparty/man-pages.git] / man5 / proc_pid_stat.5
CommitLineData
bbc21bc4
AC
1.\" Copyright (C) 1994, 1995, Daniel Quinlan <quinlan@yggdrasil.com>
2.\" Copyright (C) 2002-2008, 2017, Michael Kerrisk <mtk.manpages@gmail.com>
3.\" Copyright (C) 2023, Alejandro Colomar <alx@kernel.org>
4.\"
5.\" SPDX-License-Identifier: GPL-3.0-or-later
6.\"
7.TH proc_pid_stat 5 (date) "Linux man-pages (unreleased)"
8.SH NAME
9/proc/pid/stat \- status information
10.SH DESCRIPTION
11.TP
12.IR /proc/ pid /stat
13Status information about the process.
14This is used by
15.BR ps (1).
16It is defined in the kernel source file
17.IR fs/proc/array.c "."
18.IP
19The fields, in order, with their proper
20.BR scanf (3)
21format specifiers, are listed below.
22Whether or not certain of these fields display valid information is governed by
23a ptrace access mode
24.BR PTRACE_MODE_READ_FSCREDS " | " PTRACE_MODE_NOAUDIT
25check (refer to
26.BR ptrace (2)).
27If the check denies access, then the field value is displayed as 0.
28The affected fields are indicated with the marking [PT].
29.RS
30.TP
31(1) \fIpid\fP \ %d
32.br
33The process ID.
34.TP
35(2) \fIcomm\fP \ %s
36The filename of the executable, in parentheses.
37Strings longer than
38.B TASK_COMM_LEN
39(16) characters (including the terminating null byte) are silently truncated.
40This is visible whether or not the executable is swapped out.
41.TP
42(3) \fIstate\fP \ %c
43One of the following characters, indicating process state:
44.RS
45.TP
46R
47Running
48.TP
49S
50Sleeping in an interruptible wait
51.TP
52D
53Waiting in uninterruptible
54disk sleep
55.TP
56Z
57Zombie
58.TP
59T
60Stopped (on a signal) or (before Linux 2.6.33) trace stopped
61.TP
62t
63.\" commit 44d90df6b757c59651ddd55f1a84f28132b50d29
64Tracing stop (Linux 2.6.33 onward)
65.TP
66W
67Paging (only before Linux 2.6.0)
68.TP
69X
70Dead (from Linux 2.6.0 onward)
71.TP
72x
73.\" commit 44d90df6b757c59651ddd55f1a84f28132b50d29
74Dead (Linux 2.6.33 to
75.\" commit 74e37200de8e9c4e09b70c21c3f13c2071e77457
763.13 only)
77.TP
78K
79.\" commit 44d90df6b757c59651ddd55f1a84f28132b50d29
80Wakekill (Linux 2.6.33 to
81.\" commit 74e37200de8e9c4e09b70c21c3f13c2071e77457
823.13 only)
83.TP
84W
85.\" commit 44d90df6b757c59651ddd55f1a84f28132b50d29
86Waking (Linux 2.6.33 to
87.\" commit 74e37200de8e9c4e09b70c21c3f13c2071e77457
883.13 only)
89.TP
90P
91.\" commit f2530dc71cf0822f90bb63ea4600caaef33a66bb
92Parked (Linux 3.9 to
93.\" commit 74e37200de8e9c4e09b70c21c3f13c2071e77457
943.13 only)
95.TP
96I
97.\" commit 06eb61844d841d0032a9950ce7f8e783ee49c0d0
98Idle (Linux 4.14 onward)
99.RE
100.TP
101(4) \fIppid\fP \ %d
102The PID of the parent of this process.
103.TP
104(5) \fIpgrp\fP \ %d
105The process group ID of the process.
106.TP
107(6) \fIsession\fP \ %d
108The session ID of the process.
109.TP
110(7) \fItty_nr\fP \ %d
111The controlling terminal of the process.
112(The minor device number is contained in the combination of bits
11331 to 20 and 7 to 0;
114the major device number is in bits 15 to 8.)
115.TP
116(8) \fItpgid\fP \ %d
117.\" This field and following, up to and including wchan added 0.99.1
118The ID of the foreground process group of the controlling
119terminal of the process.
120.TP
121(9) \fIflags\fP \ %u
122The kernel flags word of the process.
123For bit meanings,
124see the PF_* defines in the Linux kernel source file
125.IR include/linux/sched.h .
126Details depend on the kernel version.
127.IP
128The format for this field was %lu before Linux 2.6.
129.TP
130(10) \fIminflt\fP \ %lu
131The number of minor faults the process has made which have not
132required loading a memory page from disk.
133.TP
134(11) \fIcminflt\fP \ %lu
135The number of minor faults that the process's
136waited-for children have made.
137.TP
138(12) \fImajflt\fP \ %lu
139The number of major faults the process has made which have
140required loading a memory page from disk.
141.TP
142(13) \fIcmajflt\fP \ %lu
143The number of major faults that the process's
144waited-for children have made.
145.TP
146(14) \fIutime\fP \ %lu
147Amount of time that this process has been scheduled in user mode,
148measured in clock ticks (divide by
149.IR sysconf(_SC_CLK_TCK) ).
150This includes guest time, \fIguest_time\fP
151(time spent running a virtual CPU, see below),
152so that applications that are not aware of the guest time field
153do not lose that time from their calculations.
154.TP
155(15) \fIstime\fP \ %lu
156Amount of time that this process has been scheduled in kernel mode,
157measured in clock ticks (divide by
158.IR sysconf(_SC_CLK_TCK) ).
159.TP
160(16) \fIcutime\fP \ %ld
161Amount of time that this process's
162waited-for children have been scheduled in user mode,
163measured in clock ticks (divide by
164.IR sysconf(_SC_CLK_TCK) ).
165(See also
166.BR times (2).)
167This includes guest time, \fIcguest_time\fP
168(time spent running a virtual CPU, see below).
169.TP
170(17) \fIcstime\fP \ %ld
171Amount of time that this process's
172waited-for children have been scheduled in kernel mode,
173measured in clock ticks (divide by
174.IR sysconf(_SC_CLK_TCK) ).
175.TP
176(18) \fIpriority\fP \ %ld
177(Explanation for Linux 2.6)
178For processes running a real-time scheduling policy
179.RI ( policy
180below; see
181.BR sched_setscheduler (2)),
182this is the negated scheduling priority, minus one;
183that is, a number in the range \-2 to \-100,
184corresponding to real-time priorities 1 to 99.
185For processes running under a non-real-time scheduling policy,
186this is the raw nice value
187.RB ( setpriority (2))
188as represented in the kernel.
189The kernel stores nice values as numbers
190in the range 0 (high) to 39 (low),
191corresponding to the user-visible nice range of \-20 to 19.
192.IP
193Before Linux 2.6, this was a scaled value based on
194the scheduler weighting given to this process.
195.\" And back in Linux 1.2 days things were different again.
196.TP
197(19) \fInice\fP \ %ld
198The nice value (see
199.BR setpriority (2)),
200a value in the range 19 (low priority) to \-20 (high priority).
201.\" Back in Linux 1.2 days things were different.
202.\" .TP
203.\" \fIcounter\fP %ld
204.\" The current maximum size in jiffies of the process's next timeslice,
205.\" or what is currently left of its current timeslice, if it is the
206.\" currently running process.
207.\" .TP
208.\" \fItimeout\fP %u
209.\" The time in jiffies of the process's next timeout.
210.\" timeout was removed sometime around 2.1/2.2
211.TP
212(20) \fInum_threads\fP \ %ld
213Number of threads in this process (since Linux 2.6).
214Before Linux 2.6, this field was hard coded to 0 as a placeholder
215for an earlier removed field.
216.TP
217(21) \fIitrealvalue\fP \ %ld
218The time in jiffies before the next
219.B SIGALRM
220is sent to the process due to an interval timer.
221Since Linux 2.6.17, this field is no longer maintained,
222and is hard coded as 0.
223.TP
224(22) \fIstarttime\fP \ %llu
225The time the process started after system boot.
226Before Linux 2.6, this value was expressed in jiffies.
227Since Linux 2.6, the value is expressed in clock ticks (divide by
228.IR sysconf(_SC_CLK_TCK) ).
229.IP
230The format for this field was %lu before Linux 2.6.
231.TP
232(23) \fIvsize\fP \ %lu
233Virtual memory size in bytes.
234.TP
235(24) \fIrss\fP \ %ld
236Resident Set Size: number of pages the process has in real memory.
237This is just the pages which
238count toward text, data, or stack space.
239This does not include pages
240which have not been demand-loaded in, or which are swapped out.
241This value is inaccurate; see
242.IR /proc/ pid /statm
243below.
244.TP
245(25) \fIrsslim\fP \ %lu
246Current soft limit in bytes on the rss of the process;
247see the description of
248.B RLIMIT_RSS
249in
250.BR getrlimit (2).
251.TP
252(26) \fIstartcode\fP \ %lu \ [PT]
253The address above which program text can run.
254.TP
255(27) \fIendcode\fP \ %lu \ [PT]
256The address below which program text can run.
257.TP
258(28) \fIstartstack\fP \ %lu \ [PT]
259The address of the start (i.e., bottom) of the stack.
260.TP
261(29) \fIkstkesp\fP \ %lu \ [PT]
262The current value of ESP (stack pointer), as found in the
263kernel stack page for the process.
264.TP
265(30) \fIkstkeip\fP \ %lu \ [PT]
266The current EIP (instruction pointer).
267.TP
268(31) \fIsignal\fP \ %lu
269The bitmap of pending signals, displayed as a decimal number.
270Obsolete, because it does not provide information on real-time signals; use
271.IR /proc/ pid /status
272instead.
273.TP
274(32) \fIblocked\fP \ %lu
275The bitmap of blocked signals, displayed as a decimal number.
276Obsolete, because it does not provide information on real-time signals; use
277.IR /proc/ pid /status
278instead.
279.TP
280(33) \fIsigignore\fP \ %lu
281The bitmap of ignored signals, displayed as a decimal number.
282Obsolete, because it does not provide information on real-time signals; use
283.IR /proc/ pid /status
284instead.
285.TP
286(34) \fIsigcatch\fP \ %lu
287The bitmap of caught signals, displayed as a decimal number.
288Obsolete, because it does not provide information on real-time signals; use
289.IR /proc/ pid /status
290instead.
291.TP
292(35) \fIwchan\fP \ %lu \ [PT]
293This is the "channel" in which the process is waiting.
294It is the address of a location in the kernel where the process is sleeping.
295The corresponding symbolic name can be found in
296.IR /proc/ pid /wchan .
297.TP
298(36) \fInswap\fP \ %lu
299.\" nswap was added in Linux 2.0
300Number of pages swapped (not maintained).
301.TP
302(37) \fIcnswap\fP \ %lu
303.\" cnswap was added in Linux 2.0
304Cumulative \fInswap\fP for child processes (not maintained).
305.TP
306(38) \fIexit_signal\fP \ %d \ (since Linux 2.1.22)
307Signal to be sent to parent when we die.
308.TP
309(39) \fIprocessor\fP \ %d \ (since Linux 2.2.8)
310CPU number last executed on.
311.TP
312(40) \fIrt_priority\fP \ %u \ (since Linux 2.5.19)
313Real-time scheduling priority, a number in the range 1 to 99 for
314processes scheduled under a real-time policy,
315or 0, for non-real-time processes (see
316.BR sched_setscheduler (2)).
317.TP
318(41) \fIpolicy\fP \ %u \ (since Linux 2.5.19)
319Scheduling policy (see
320.BR sched_setscheduler (2)).
321Decode using the SCHED_* constants in
322.IR linux/sched.h .
323.IP
324The format for this field was %lu before Linux 2.6.22.
325.TP
326(42) \fIdelayacct_blkio_ticks\fP \ %llu \ (since Linux 2.6.18)
327Aggregated block I/O delays, measured in clock ticks (centiseconds).
328.TP
329(43) \fIguest_time\fP \ %lu \ (since Linux 2.6.24)
330Guest time of the process (time spent running a virtual CPU
331for a guest operating system), measured in clock ticks (divide by
332.IR sysconf(_SC_CLK_TCK) ).
333.TP
334(44) \fIcguest_time\fP \ %ld \ (since Linux 2.6.24)
335Guest time of the process's children, measured in clock ticks (divide by
336.IR sysconf(_SC_CLK_TCK) ).
337.TP
338(45) \fIstart_data\fP \ %lu \ (since Linux 3.3) \ [PT]
339.\" commit b3f7f573a20081910e34e99cbc91831f4f02f1ff
340Address above which program initialized and
341uninitialized (BSS) data are placed.
342.TP
343(46) \fIend_data\fP \ %lu \ (since Linux 3.3) \ [PT]
344.\" commit b3f7f573a20081910e34e99cbc91831f4f02f1ff
345Address below which program initialized and
346uninitialized (BSS) data are placed.
347.TP
348(47) \fIstart_brk\fP \ %lu \ (since Linux 3.3) \ [PT]
349.\" commit b3f7f573a20081910e34e99cbc91831f4f02f1ff
350Address above which program heap can be expanded with
351.BR brk (2).
352.TP
353(48) \fIarg_start\fP \ %lu \ (since Linux 3.5) \ [PT]
354.\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
355Address above which program command-line arguments
356.RI ( argv )
357are placed.
358.TP
359(49) \fIarg_end\fP \ %lu \ (since Linux 3.5) \ [PT]
360.\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
361Address below program command-line arguments
362.RI ( argv )
363are placed.
364.TP
365(50) \fIenv_start\fP \ %lu \ (since Linux 3.5) \ [PT]
366.\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
367Address above which program environment is placed.
368.TP
369(51) \fIenv_end\fP \ %lu \ (since Linux 3.5) \ [PT]
370.\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
371Address below which program environment is placed.
372.TP
373(52) \fIexit_code\fP \ %d \ (since Linux 3.5) \ [PT]
374.\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
375The thread's exit status in the form reported by
376.BR waitpid (2).
377.RE
378.SH SEE ALSO
379.BR proc (5),
380.BR proc_pid_status (5)