CONTRIBUTING.d/patches: Please provide a git-range-diff(1)
[man-pages.git] / man5 / proc_stat.5
blobcc5dfd5751d57fd511254434b577035c3e3bf2e0
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_stat 5 (date) "Linux man-pages (unreleased)"
8 .SH NAME
9 /proc/stat \- kernel system statistics
10 .SH DESCRIPTION
11 .TP
12 .I /proc/stat
13 kernel/system statistics.
14 Varies with architecture.
15 Common
16 entries include:
17 .RS
18 .TP
19 .I cpu  10132153 290696 3084719 46828483 16683 0 25195 0 175628 0
20 .TQ
21 .I cpu0 1393280 32966 572056 13343292 6130 0 17875 0 23933 0
22 The amount of time, measured in units of
23 USER_HZ (1/100ths of a second on most architectures, use
24 .I sysconf(_SC_CLK_TCK)
25 to obtain the right value),
26 .\" 1024 on Alpha and ia64
27 that the system ("cpu" line) or the specific CPU ("cpu\fIN\fR" line)
28 spent in various states:
29 .RS
30 .TP
31 .I user
32 (1) Time spent in user mode.
33 .TP
34 .I nice
35 (2) Time spent in user mode with low priority (nice).
36 .TP
37 .I system
38 (3) Time spent in system mode.
39 .TP
40 .I idle
41 (4) Time spent in the idle task.
42 .\" FIXME . Actually, the following info about the /proc/stat 'cpu' field
43 .\"       does not seem to be quite right (at least in Linux 2.6.12 or Linux 3.6):
44 .\"       the idle time in /proc/uptime does not quite match this value
45 This value should be USER_HZ times the
46 second entry in the
47 .I /proc/uptime
48 pseudo-file.
49 .TP
50 .IR iowait " (since Linux 2.5.41)"
51 (5) Time waiting for I/O to complete.
52 This value is not reliable, for the following reasons:
53 .\" See kernel commit 9c240d757658a3ae9968dd309e674c61f07c7f48
54 .RS
55 .IP \[bu] 3
56 The CPU will not wait for I/O to complete;
57 iowait is the time that a task is waiting for I/O to complete.
58 When a CPU goes into idle state for outstanding task I/O,
59 another task will be scheduled on this CPU.
60 .IP \[bu]
61 On a multi-core CPU,
62 the task waiting for I/O to complete is not running on any CPU,
63 so the iowait of each CPU is difficult to calculate.
64 .IP \[bu]
65 The value in this field may
66 .I decrease
67 in certain conditions.
68 .RE
69 .TP
70 .IR irq " (since Linux 2.6.0)"
71 .\" Precisely: Linux 2.6.0-test4
72 (6) Time servicing interrupts.
73 .TP
74 .IR softirq " (since Linux 2.6.0)"
75 .\" Precisely: Linux 2.6.0-test4
76 (7) Time servicing softirqs.
77 .TP
78 .IR steal " (since Linux 2.6.11)"
79 (8) Stolen time, which is the time spent in other operating systems when
80 running in a virtualized environment
81 .TP
82 .IR guest " (since Linux 2.6.24)"
83 (9) Time spent running a virtual CPU for guest
84 operating systems under the control of the Linux kernel.
85 .\" See Changelog entry for 5e84cfde51cf303d368fcb48f22059f37b3872de
86 .TP
87 .IR guest_nice " (since Linux 2.6.33)"
88 .\" commit ce0e7b28fb75cb003cfc8d0238613aaf1c55e797
89 (10) Time spent running a niced guest (virtual CPU for guest
90 operating systems under the control of the Linux kernel).
91 .RE
92 .TP
93 \fIpage 5741 1808\fP
94 The number of pages the system paged in and the number that were paged
95 out (from disk).
96 .TP
97 \fIswap 1 0\fP
98 The number of swap pages that have been brought in and out.
99 .TP
100 .\" FIXME . The following is not the full picture for the 'intr' of
101 .\"       /proc/stat on 2.6:
102 \fIintr 1462898\fP
103 This line shows counts of interrupts serviced since boot time,
104 for each of the possible system interrupts.
105 The first column is the total of all interrupts serviced
106 including unnumbered architecture specific interrupts;
107 each subsequent column is the total for that particular numbered interrupt.
108 Unnumbered interrupts are not shown, only summed into the total.
110 \fIdisk_io: (2,0):(31,30,5764,1,2) (3,0):\fP...
111 (major,disk_idx):(noinfo, read_io_ops, blks_read, write_io_ops, blks_written)
113 (Linux 2.4 only)
115 \fIctxt 115315\fP
116 The number of context switches that the system underwent.
118 \fIbtime 769041601\fP
119 boot time, in seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
121 \fIprocesses 86031\fP
122 Number of forks since boot.
124 \fIprocs_running 6\fP
125 Number of processes in runnable state.
126 (Linux 2.5.45 onward.)
128 \fIprocs_blocked 2\fP
129 Number of processes blocked waiting for I/O to complete.
130 (Linux 2.5.45 onward.)
132 .I softirq 229245889 94 60001584 13619 5175704 2471304 28 51212741 59130143 0 51240672
133 .\" commit d3d64df21d3d0de675a0d3ffa7c10514f3644b30
134 This line shows the number of softirq for all CPUs.
135 The first column is the total of all softirqs and
136 each subsequent column is the total for particular softirq.
137 (Linux 2.6.31 onward.)
139 .SH SEE ALSO
140 .BR proc (5)