Linux "lscpu" Command Line Options and Examples
display information about the CPU architecture

lscpu gathers CPU architecture information from sysfs, /proc/cpuinfo and any applicable architecture-specific libraries (e.g. librtas on Powerpc).


Usage:

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




Command Line Options:

-a
Include lines for online and offline CPUs in the output (default for -e). This option may only be specified together withoption -e or -p.
lscpu -a ...
-b
Limit the output to online CPUs (default for -p). This option may only be specified together with option -e or -p.
lscpu -b ...
-c
Limit the output to offline CPUs. This option may only be specified together with option -e or -p.
lscpu -c ...
-e
Display the CPU information in human-readable format.If the list argument is omitted, all columns for which data is available are included in the command output.When specifying the list argument, the string of option, equal sign (=), and list must not contain any blanks or other white‐space. Examples: '-e=cpu,node' or '--extended=cpu,node'.
lscpu -e ...
-h
Display help text and exit.
lscpu -h ...
-J
Use JSON output format for the default summary or extended output (see --extended).
lscpu -J ...
-p
Optimize the command output for easy parsing.If the list argument is omitted, the command output is compatible with earlier versions of lscpu. In this compatible format,two commas are used to separate CPU cache columns. If no CPU caches are identified the cache column is omitted.If the list argument is used, cache columns are separated with a colon (:).When specifying the list argument, the string of option, equal sign (=), and list must not contain any blanks or other white‐space. Examples: '-p=cpu,node' or '--parse=cpu,node'.
lscpu -p ...
-s
Gather CPU data for a Linux instance other than the instance from which the lscpu command is issued. The specified directoryis the system root of the Linux instance to be inspected.
lscpu -s ...
-x
Use hexadecimal masks for CPU sets (for example 0x3). The default is to print the sets in list format (for example 0,1).
lscpu -x ...
-y
Display physical IDs for all columns with topology elements (core, socket, etc.). Other than logical IDs, which are assignedby lscpu, physical IDs are platform-specific values that are provided by the kernel. Physical IDs are not necessarily uniqueand they might not be arranged sequentially. If the kernel could not retrieve a physical ID for an element lscpu prints thedash (-) character.The CPU logical numbers are not affected by this option.
lscpu -y ...
-V
Display version information and exit.BUGSThe basic overview of CPU family, model, etc. is always based on the first CPU only.Sometimes in Xen Dom0 the kernel reports wrong data.On virtual hardware the number of cores per socket, etc. can be wrong.AUTHORCai Qian <qcai@redhat.com>Karel Zak <kzak@redhat.com>Heiko Carstens <heiko.carstens@de.ibm.com>
lscpu -V ...