1 .TH LSCPU 1 "November 2015" "util-linux" "User Commands"
3 lscpu \- display information about the CPU architecture
6 .RB [ \-a | \-b | \-c | \-J "] [" \-x "] [" \-y "] [" \-s " \fIdirectory\fP] [" \-e [=\fIlist\fP]| \-p [=\fIlist\fP]]
12 gathers CPU architecture information from sysfs, /proc/cpuinfo and any
13 applicable architecture-specific libraries (e.g.\& librtas on Powerpc). The
14 command output can be optimized for parsing or for easy readability by humans.
15 The information includes, for example, the number of CPUs, threads, cores,
16 sockets, and Non-Uniform Memory Access (NUMA) nodes. There is also information
17 about the CPU caches and cache sharing, family, model, bogoMIPS, byte order,
20 In virtualized environments, the CPU architecture information displayed
21 reflects the configuration of the guest operating system which is
22 typically different from the physical (host) system. On architectures that
23 support retrieving physical topology information,
25 also displays the number of physical sockets, chips, cores in the host system.
27 Options that result in an output table have a \fIlist\fP argument. Use this
28 argument to customize the command output. Specify a comma-separated list of
29 column labels to limit the output table to only the specified columns, arranged
30 in the specified order. See \fBCOLUMNS\fP for a list of valid column labels. The
31 column labels are not case sensitive.
33 Not all columns are supported on all architectures. If an unsupported column is
34 specified, \fBlscpu\fP prints the column but does not provide any data for it.
37 Note that topology elements (core, socket, etc.) use a sequential unique ID
38 starting from zero, but CPU logical numbers follow the kernel where there is
39 no guarantee of sequential numbering.
42 The logical CPU number of a CPU as used by the Linux kernel.
45 The logical core number. A core can contain several CPUs.
48 The logical socket number. A socket can contain several cores.
51 The logical book number. A book can contain several sockets.
54 The logical drawer number. A drawer can contain several books.
57 The logical NUMA node number. A node can contain several drawers.
60 Information about how caches are shared between CPUs.
63 The physical address of a CPU.
66 Indicator that shows whether the Linux instance currently makes use of the CPU.
69 Indicator that shows if the hypervisor has allocated the CPU to the virtual
70 hardware on which the Linux instance runs. CPUs that are configured can be set
71 online by the Linux instance.
72 This column contains data only if your hardware system and hypervisor support
73 dynamic CPU resource allocation.
76 This column contains data for Linux instances that run on virtual hardware with
77 a hypervisor that can switch the CPU dispatching mode (polarization). The
82 The workload is spread across all available CPUs.
85 The workload is concentrated on few CPUs.
87 For vertical polarization, the column also shows the degree of concentration,
88 high, medium, or low. This column contains data only if your hardware system
89 and hypervisor support CPU polarization.
93 Maximum megahertz value for the CPU. Useful when \fBlscpu\fP is used as hardware
94 inventory information gathering tool. Notice that the megahertz value is
95 dynamic, and driven by CPU governor depending on current resource need.
98 Minimum megahertz value for the CPU.
102 Include lines for online and offline CPUs in the output (default for \fB-e\fR).
103 This option may only be specified together with option \fB-e\fR or \fB-p\fR.
105 .BR \-B , " \-\-bytes"
106 Print the sizes in bytes rather than in a human-readable format.
108 .BR \-b , " \-\-online"
109 Limit the output to online CPUs (default for \fB-p\fR).
110 This option may only be specified together with option \fB-e\fR or \fB-p\fR.
112 .BR \-C , " \-\-caches" [=\fIlist\fP]
113 Display details about CPU caches. For details about available information see \fB\-\-help\fR
116 If the \fIlist\fP argument is omitted, all columns for which data is available
117 are included in the command output.
119 When specifying the \fIlist\fP argument, the string of option, equal sign (=), and
120 \fIlist\fP must not contain any blanks or other whitespace.
121 Examples: '\fB-C=NAME,ONE-SIZE\fP' or '\fB--caches=NAME,ONE-SIZE\fP'.
123 .BR \-c , " \-\-offline"
124 Limit the output to offline CPUs.
125 This option may only be specified together with option \fB-e\fR or \fB-p\fR.
127 .BR \-e , " \-\-extended" [=\fIlist\fP]
128 Display the CPU information in human-readable format.
130 If the \fIlist\fP argument is omitted, all columns for which data is available
131 are included in the command output.
133 When specifying the \fIlist\fP argument, the string of option, equal sign (=), and
134 \fIlist\fP must not contain any blanks or other whitespace.
135 Examples: '\fB-e=cpu,node\fP' or '\fB--extended=cpu,node\fP'.
137 .BR \-h , " \-\-help"
138 Display help text and exit.
140 .BR \-J , " \-\-json"
141 Use JSON output format for the default summary or extended output (see \fB\-\-extended\fP).
143 .BR \-p , " \-\-parse" [=\fIlist\fP]
144 Optimize the command output for easy parsing.
146 If the \fIlist\fP argument is omitted, the command output is compatible with earlier
147 versions of \fBlscpu\fP. In this compatible format, two commas are used to separate
148 CPU cache columns. If no CPU caches are identified the cache column is omitted.
150 If the \fIlist\fP argument is used, cache columns are separated with a colon (:).
152 When specifying the \fIlist\fP argument, the string of option, equal sign (=), and
153 \fIlist\fP must not contain any blanks or other whitespace.
154 Examples: '\fB-p=cpu,node\fP' or '\fB--parse=cpu,node\fP'.
156 .BR \-s , " \-\-sysroot " \fIdirectory\fP
157 Gather CPU data for a Linux instance other than the instance from which the
158 \fBlscpu\fP command is issued. The specified \fIdirectory\fP is the system root
159 of the Linux instance to be inspected.
162 Use hexadecimal masks for CPU sets (for example "ff"). The default is to print
163 the sets in list format (for example 0,1). Note that before version 2.30 the mask
164 has been printed with 0x prefix.
166 .BR \-y , " \-\-physical"
167 Display physical IDs for all columns with topology elements (core, socket, etc.).
168 Other than logical IDs, which are assigned by \fBlscpu\fP, physical IDs are
169 platform-specific values that are provided by the kernel. Physical IDs are not
170 necessarily unique and they might not be arranged sequentially.
171 If the kernel could not retrieve a physical ID for an element \fBlscpu\fP prints
172 the dash (-) character.
174 The CPU logical numbers are not affected by this option.
176 .BR \-V , " \-\-version"
177 Display version information and exit.
180 Output all available columns. This option must be combined with either
181 .BR \-\-extended " or " \-\-parse .
183 The basic overview of CPU family, model, etc. is always based on the first
186 Sometimes in Xen Dom0 the kernel reports wrong data.
188 On virtual hardware the number of cores per socket, etc. can be wrong.
191 Cai Qian <qcai@redhat.com>
192 Karel Zak <kzak@redhat.com>
193 Heiko Carstens <heiko.carstens@de.ibm.com>
198 The lscpu command is part of the util-linux package and is available from
199 https://www.kernel.org/pub/linux/utils/util-linux/.