Debian Codegraph @

upstream/debian-unstable/man5/proc_pid_stat.5

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