/proc/pid/stat - status information
/proc/
pid/stat
Status information about the process. This is used by
ps(1). It is defined in the kernel source file
fs/proc/array.c
.
The fields, in order, with their proper scanf(3) format specifiers, are listed below. Whether or not certain of these fields display valid information is governed by a ptrace access mode PTRACE_MODE_READ_FSCREDS | PTRACE_MODE_NOAUDIT check (refer to ptrace(2)). If the check denies access, then the field value is displayed as 0. The affected fields are indicated with the marking [PT].
pid
%d
The process ID.
comm
%sThe filename of the executable, in parentheses. Strings longer than TASK_COMM_LEN (16) characters (including the terminating null byte) are silently truncated. This is visible whether or not the executable is swapped out.
state
%cOne of the following characters, indicating process state:
Running
Sleeping in an interruptible wait
Waiting in uninterruptible disk sleep
Zombie
Stopped (on a signal) or (before Linux 2.6.33) trace stopped
Tracing stop (Linux 2.6.33 onward)
Paging (only before Linux 2.6.0)
Dead (from Linux 2.6.0 onward)
Dead (Linux 2.6.33 to 3.13 only)
Wakekill (Linux 2.6.33 to 3.13 only)
Waking (Linux 2.6.33 to 3.13 only)
Parked (Linux 3.9 to 3.13 only)
Idle (Linux 4.14 onward)
ppid
%dThe PID of the parent of this process.
pgrp
%dThe process group ID of the process.
session
%dThe session ID of the process.
tty_nr
%dThe 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.)
tpgid
%dThe ID of the foreground process group of the controlling terminal of the process.
flags
%uThe 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.
minflt
%luThe number of minor faults the process has made which have not required loading a memory page from disk.
cminflt
%luThe number of minor faults that the process's waited-for children have made.
majflt
%luThe number of major faults the process has made which have required loading a memory page from disk.
cmajflt
%luThe number of major faults that the process's waited-for children have made.
utime
%luAmount 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.
stime
%luAmount of time that this process has been scheduled in kernel mode,
measured in clock ticks (divide by sysconf(_SC_CLK_TCK)
).
cutime
%ldAmount 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).
cstime
%ldAmount 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)
).
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.
nice
%ldThe nice value (see setpriority(2)), a value in the range 19 (low priority) to -20 (high priority).
num_threads
%ldNumber 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.
itrealvalue
%ldThe 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.
starttime
%lluThe 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.
vsize
%luVirtual memory size in bytes.
rss
%ldResident 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. This value is inaccurate; see
/proc/
pid/statm
below.
rsslim
%luCurrent soft limit in bytes on the rss of the process; see the description of RLIMIT_RSS in getrlimit(2).
startcode
%lu [PT]The address above which program text can run.
endcode
%lu [PT]The address below which program text can run.
startstack
%lu [PT]The address of the start (i.e., bottom) of the stack.
kstkesp
%lu [PT]The current value of ESP (stack pointer), as found in the kernel stack page for the process.
kstkeip
%lu [PT]The current EIP (instruction pointer).
signal
%luThe 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.
blocked
%luThe 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.
sigignore
%luThe 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.
sigcatch
%luThe 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.
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
.
nswap
%luNumber of pages swapped (not maintained).
cnswap
%luCumulative nswap
for child processes (not maintained).
exit_signal
%d (since Linux 2.1.22)Signal to be sent to parent when we die.
processor
%d (since Linux 2.2.8)CPU number last executed on.
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)).
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.
delayacct_blkio_ticks
%llu (since Linux 2.6.18)Aggregated block I/O delays, measured in clock ticks (centiseconds).
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)
).
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)
).
start_data
%lu (since Linux 3.3) [PT]Address above which program initialized and uninitialized (BSS) data are placed.
end_data
%lu (since Linux 3.3) [PT]Address below which program initialized and uninitialized (BSS) data are placed.
start_brk
%lu (since Linux 3.3) [PT]Address above which program heap can be expanded with brk(2).
arg_start
%lu (since Linux 3.5) [PT]Address above which program command-line arguments (argv
)
are placed.
arg_end
%lu (since Linux 3.5) [PT]Address below program command-line arguments (argv
) are
placed.
env_start
%lu (since Linux 3.5) [PT]Address above which program environment is placed.
env_end
%lu (since Linux 3.5) [PT]Address below which program environment is placed.
exit_code
%d (since Linux 3.5) [PT]The thread's exit status in the form reported by waitpid(2).
proc(5), proc_pid_status(5)