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

NAME

6       lscpu - display information about the CPU architecture
7

SYNOPSIS

9       lscpu [-a|-b|-c|-J] [-x] [-y] [-s directory] [-e[=list]|-p[=list]]
10       lscpu -h|-V
11

DESCRIPTION

13       lscpu  gathers  CPU  architecture information from sysfs, /proc/cpuinfo
14       and any applicable architecture-specific  libraries  (e.g.  librtas  on
15       Powerpc).   The command output can be optimized for parsing or for easy
16       readability by humans.  The information includes, for example, the num‐
17       ber  of  CPUs,  threads,  cores, sockets, and Non-Uniform Memory Access
18       (NUMA) nodes.  There is also information about the CPU caches and cache
19       sharing, family, model, bogoMIPS, byte order, and stepping.
20
21       In virtualized environments, the CPU architecture information displayed
22       reflects the configuration of the guest operating system which is typi‐
23       cally different from the physical (host) system.  On architectures that
24       support retrieving physical topology information, lscpu  also  displays
25       the number of physical sockets, chips, cores in the host system.
26
27       Options  that result in an output table have a list argument.  Use this
28       argument to customize the command output.   Specify  a  comma-separated
29       list  of  column labels to limit the output table to only the specified
30       columns, arranged in the specified order.  See COLUMNS for  a  list  of
31       valid column labels.  The column labels are not case sensitive.
32
33       Not  all columns are supported on all architectures.  If an unsupported
34       column is specified, lscpu prints the column but does not  provide  any
35       data for it.
36
37
38   COLUMNS
39       Note  that  topology  elements  (core,  socket,  etc.) use a sequential
40       unique ID starting from zero, but CPU logical numbers follow the kernel
41       where there is no guarantee of sequential numbering.
42
43       CPU    The logical CPU number of a CPU as used by the Linux kernel.
44
45       CORE   The logical core number.  A core can contain several CPUs.
46
47       SOCKET The logical socket number.  A socket can contain several cores.
48
49       BOOK   The logical book number.  A book can contain several sockets.
50
51       DRAWER The logical drawer number.  A drawer can contain several books.
52
53       NODE   The  logical NUMA node number.  A node can contain several draw‐
54              ers.
55
56       CACHE  Information about how caches are shared between CPUs.
57
58       ADDRESS
59              The physical address of a CPU.
60
61       ONLINE Indicator that shows whether the Linux instance currently  makes
62              use of the CPU.
63
64       CONFIGURED
65              Indicator  that shows if the hypervisor has allocated the CPU to
66              the virtual hardware on which the  Linux  instance  runs.   CPUs
67              that  are  configured  can  be set online by the Linux instance.
68              This column contains data  only  if  your  hardware  system  and
69              hypervisor support dynamic CPU resource allocation.
70
71       POLARIZATION
72              This  column  contains data for Linux instances that run on vir‐
73              tual hardware with a hypervisor that can  switch  the  CPU  dis‐
74              patching mode (polarization).  The polarization can be:
75
76              horizontal  The workload is spread across all available CPUs.
77
78              vertical    The workload is concentrated on few CPUs.
79
80              For  vertical  polarization, the column also shows the degree of
81              concentration, high, medium, or low.  This column contains  data
82              only  if  your hardware system and hypervisor support CPU polar‐
83              ization.
84
85       MAXMHZ Maximum megahertz value for the CPU. Useful when lscpu  is  used
86              as  hardware  inventory information gathering tool.  Notice that
87              the megahertz value is  dynamic,  and  driven  by  CPU  governor
88              depending on current resource need.
89
90       MINMHZ Minimum megahertz value for the CPU.
91

OPTIONS

93       -a, --all
94              Include lines for online and offline CPUs in the output (default
95              for -e).  This option may only be specified together with option
96              -e or -p.
97
98       -b, --online
99              Limit  the  output to online CPUs (default for -p).  This option
100              may only be specified together with option -e or -p.
101
102       -c, --offline
103              Limit the output to offline CPUs.  This option may only be spec‐
104              ified together with option -e or -p.
105
106       -e, --extended[=list]
107              Display the CPU information in human-readable format.
108
109              If  the  list argument is omitted, all columns for which data is
110              available are included in the command output.
111
112              When specifying the list argument, the string of  option,  equal
113              sign  (=),  and list must not contain any blanks or other white‐
114              space.  Examples: '-e=cpu,node' or '--extended=cpu,node'.
115
116       -h, --help
117              Display help text and exit.
118
119       -J, --json
120              Use JSON output format for the default summary or extended  out‐
121              put (see --extended).
122
123       -p, --parse[=list]
124              Optimize the command output for easy parsing.
125
126              If  the list argument is omitted, the command output is compati‐
127              ble with earlier versions of lscpu.  In this compatible  format,
128              two  commas  are  used to separate CPU cache columns.  If no CPU
129              caches are identified the cache column is omitted.
130              If the list argument is used, cache columns are separated with a
131              colon (:).
132
133              When  specifying  the list argument, the string of option, equal
134              sign (=), and list must not contain any blanks or  other  white‐
135              space.  Examples: '-p=cpu,node' or '--parse=cpu,node'.
136
137       -s, --sysroot directory
138              Gather  CPU  data  for  a Linux instance other than the instance
139              from which the lscpu command is issued.  The specified directory
140              is the system root of the Linux instance to be inspected.
141
142       -x, --hex
143              Use  hexadecimal  masks  for  CPU  sets  (for example 0x3).  The
144              default is to print the sets in list format (for example 0,1).
145
146       -y, --physical
147              Display physical IDs for  all  columns  with  topology  elements
148              (core,  socket,  etc.).   Other  than  logical  IDs,  which  are
149              assigned by lscpu, physical  IDs  are  platform-specific  values
150              that  are provided by the kernel. Physical IDs are not necessar‐
151              ily unique and they might not be arranged sequentially.  If  the
152              kernel  could  not  retrieve  a physical ID for an element lscpu
153              prints the dash (-) character.
154
155              The CPU logical numbers are not affected by this option.
156
157       -V, --version
158              Display version information and exit.
159

BUGS

161       The basic overview of CPU family, model, etc. is always  based  on  the
162       first CPU only.
163
164       Sometimes in Xen Dom0 the kernel reports wrong data.
165
166       On virtual hardware the number of cores per socket, etc. can be wrong.
167

AUTHOR

169       Cai Qian <qcai@redhat.com>
170       Karel Zak <kzak@redhat.com>
171       Heiko Carstens <heiko.carstens@de.ibm.com>
172

SEE ALSO

174       chcpu(8)
175

AVAILABILITY

177       The  lscpu  command  is part of the util-linux package and is available
178       from https://www.kernel.org/pub/linux/utils/util-linux/.
179
180
181
182util-linux                       November 2015                        LSCPU(1)
Impressum