1LSCPU(1)                         User Commands                        LSCPU(1)
2
3
4

NAME

6       lscpu - display information about the CPU architecture
7

SYNOPSIS

9       lscpu [options]
10

DESCRIPTION

12       lscpu gathers CPU architecture information from sysfs, /proc/cpuinfo
13       and any applicable architecture-specific libraries (e.g. librtas on
14       Powerpc). The command output can be optimized for parsing or for easy
15       readability by humans. The information includes, for example, the
16       number of CPUs, threads, cores, sockets, and Non-Uniform Memory Access
17       (NUMA) nodes. There is also information about the CPU caches and cache
18       sharing, family, model, bogoMIPS, byte order, and stepping.
19
20       The default output formatting on terminal is subject to change and
21       maybe optimized for better readability. The output for non-terminals
22       (e.g., pipes) is never affected by this optimization and it is always
23       in "Field: data\n" format. Use for example "lscpu | less" to see the
24       default output without optimizations.
25
26       In virtualized environments, the CPU architecture information displayed
27       reflects the configuration of the guest operating system which is
28       typically different from the physical (host) system. On architectures
29       that support retrieving physical topology information, lscpu also
30       displays the number of physical sockets, chips, cores in the host
31       system.
32
33       Options that result in an output table have a list argument. Use this
34       argument to customize the command output. Specify a comma-separated
35       list of column labels to limit the output table to only the specified
36       columns, arranged in the specified order. See COLUMNS for a list of
37       valid column labels. The column labels are not case sensitive.
38
39       Not all columns are supported on all architectures. If an unsupported
40       column is specified, lscpu prints the column but does not provide any
41       data for it.
42
43       The cache sizes are reported as summary from all CPUs. The versions
44       before v2.34 reported per-core sizes, but this output was confusing due
45       to complicated CPUs topology and the way how caches are shared between
46       CPUs. For more details about caches see --cache. Since version v2.37
47       lscpu follows cache IDs as provided by Linux kernel and it does not
48       always start from zero.
49

OPTIONS

51       -a, --all
52           Include lines for online and offline CPUs in the output (default
53           for -e). This option may only be specified together with option -e
54           or -p.
55
56       -B, --bytes
57           Print the sizes in bytes rather than in a human-readable format.
58
59       -b, --online
60           Limit the output to online CPUs (default for -p). This option may
61           only be specified together with option -e or -p.
62
63       -C, --caches[=list]
64           Display details about CPU caches. For details about available
65           information see --help output.
66
67           If the list argument is omitted, all columns for which data is
68           available are included in the command output.
69
70           When specifying the list argument, the string of option, equal sign
71           (=), and list must not contain any blanks or other whitespace.
72           Examples: '-C=NAME,ONE-SIZE' or '--caches=NAME,ONE-SIZE'.
73
74           The default list of columns may be extended if list is specified in
75           the format +list (e.g., lscpu -C=+ALLOC-POLICY).
76
77       -c, --offline
78           Limit the output to offline CPUs. This option may only be specified
79           together with option -e or -p.
80
81       -e, --extended[=list]
82           Display the CPU information in human-readable format.
83
84           If the list argument is omitted, the default columns are included
85           in the command output. The default output is subject to change.
86
87           When specifying the list argument, the string of option, equal sign
88           (=), and list must not contain any blanks or other whitespace.
89           Examples: '-e=cpu,node' or '--extended=cpu,node'.
90
91           The default list of columns may be extended if list is specified in
92           the format +list (e.g., lscpu -e=+MHZ).
93
94       -h, --help
95           Display help text and exit.
96
97       -J, --json
98           Use JSON output format for the default summary or extended output
99           (see --extended).
100
101       -p, --parse[=list]
102           Optimize the command output for easy parsing.
103
104           If the list argument is omitted, the command output is compatible
105           with earlier versions of lscpu. In this compatible format, two
106           commas are used to separate CPU cache columns. If no CPU caches are
107           identified the cache column is omitted. If the list argument is
108           used, cache columns are separated with a colon (:).
109
110           When specifying the list argument, the string of option, equal sign
111           (=), and list must not contain any blanks or other whitespace.
112           Examples: '-p=cpu,node' or '--parse=cpu,node'.
113
114           The default list of columns may be extended if list is specified in
115           the format +list (e.g., lscpu -p=+MHZ).
116
117       -s, --sysroot directory
118           Gather CPU data for a Linux instance other than the instance from
119           which the lscpu command is issued. The specified directory is the
120           system root of the Linux instance to be inspected.
121
122       -x, --hex
123           Use hexadecimal masks for CPU sets (for example "ff"). The default
124           is to print the sets in list format (for example 0,1). Note that
125           before version 2.30 the mask has been printed with 0x prefix.
126
127       -y, --physical
128           Display physical IDs for all columns with topology elements (core,
129           socket, etc.). Other than logical IDs, which are assigned by lscpu,
130           physical IDs are platform-specific values that are provided by the
131           kernel. Physical IDs are not necessarily unique and they might not
132           be arranged sequentially. If the kernel could not retrieve a
133           physical ID for an element lscpu prints the dash (-) character.
134
135           The CPU logical numbers are not affected by this option.
136
137       -V, --version
138           Display version information and exit.
139
140       --output-all
141           Output all available columns. This option must be combined with
142           either --extended, --parse or --caches.
143

BUGS

145       The basic overview of CPU family, model, etc. is always based on the
146       first CPU only.
147
148       Sometimes in Xen Dom0 the kernel reports wrong data.
149
150       On virtual hardware the number of cores per socket, etc. can be wrong.
151

AUTHORS

153       Cai Qian <qcai@redhat.com>, Karel Zak <kzak@redhat.com>, Heiko Carstens
154       <heiko.carstens@de.ibm.com>
155

SEE ALSO

157       chcpu(8)
158

REPORTING BUGS

160       For bug reports, use the issue tracker at
161       https://github.com/karelzak/util-linux/issues.
162

AVAILABILITY

164       The lscpu command is part of the util-linux package which can be
165       downloaded from Linux Kernel Archive
166       <https://www.kernel.org/pub/linux/utils/util-linux/>.
167
168
169
170util-linux 2.37.2                 2021-06-02                          LSCPU(1)
Impressum