293 lines
9.6 KiB
HTML
293 lines
9.6 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of LSCPU</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>LSCPU</H1>
|
|
Section: User Commands (1)<BR>Updated: March 2019<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
lscpu - display information about the CPU architecture
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>lscpu</B>
|
|
|
|
[options]
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<B>lscpu</B>
|
|
|
|
gathers CPU architecture information from sysfs, /proc/cpuinfo and any
|
|
applicable architecture-specific libraries (e.g. librtas on Powerpc). The
|
|
command output can be optimized for parsing or for easy readability by humans.
|
|
The information includes, for example, the number of CPUs, threads, cores,
|
|
sockets, and Non-Uniform Memory Access (NUMA) nodes. There is also information
|
|
about the CPU caches and cache sharing, family, model, bogoMIPS, byte order,
|
|
and stepping.
|
|
<P>
|
|
In virtualized environments, the CPU architecture information displayed
|
|
reflects the configuration of the guest operating system which is
|
|
typically different from the physical (host) system. On architectures that
|
|
support retrieving physical topology information,
|
|
<B>lscpu</B>
|
|
|
|
also displays the number of physical sockets, chips, cores in the host system.
|
|
<P>
|
|
Options that result in an output table have a <I>list</I> argument. Use this
|
|
argument to customize the command output. Specify a comma-separated list of
|
|
column labels to limit the output table to only the specified columns, arranged
|
|
in the specified order. See <B>COLUMNS</B> for a list of valid column labels. The
|
|
column labels are not case sensitive.
|
|
<P>
|
|
Not all columns are supported on all architectures. If an unsupported column is
|
|
specified, <B>lscpu</B> prints the column but does not provide any data for it.
|
|
<P>
|
|
The default output formatting on terminal maybe optimized for better
|
|
readability. The output for non-terminals (e.g. pipes) is never affected by
|
|
this optimization and it is always in "Field: data\n" format.
|
|
<A NAME="lbAE"> </A>
|
|
<H3>COLUMNS</H3>
|
|
|
|
Note that topology elements (core, socket, etc.) use a sequential unique ID
|
|
starting from zero, but CPU logical numbers follow the kernel where there is
|
|
no guarantee of sequential numbering.
|
|
<DL COMPACT>
|
|
<DT id="1"><B>CPU</B>
|
|
|
|
<DD>
|
|
The logical CPU number of a CPU as used by the Linux kernel.
|
|
<DT id="2"><B>CORE</B>
|
|
|
|
<DD>
|
|
The logical core number. A core can contain several CPUs.
|
|
<DT id="3"><B>SOCKET</B>
|
|
|
|
<DD>
|
|
The logical socket number. A socket can contain several cores.
|
|
<DT id="4"><B>BOOK</B>
|
|
|
|
<DD>
|
|
The logical book number. A book can contain several sockets.
|
|
<DT id="5"><B>DRAWER</B>
|
|
|
|
<DD>
|
|
The logical drawer number. A drawer can contain several books.
|
|
<DT id="6"><B>NODE</B>
|
|
|
|
<DD>
|
|
The logical NUMA node number. A node can contain several drawers.
|
|
<DT id="7"><B>CACHE</B>
|
|
|
|
<DD>
|
|
Information about how caches are shared between CPUs.
|
|
<DT id="8"><B>ADDRESS</B>
|
|
|
|
<DD>
|
|
The physical address of a CPU.
|
|
<DT id="9"><B>ONLINE</B>
|
|
|
|
<DD>
|
|
Indicator that shows whether the Linux instance currently makes use of the CPU.
|
|
<DT id="10"><B>CONFIGURED</B>
|
|
|
|
<DD>
|
|
Indicator that shows if the hypervisor has allocated the CPU to the virtual
|
|
hardware on which the Linux instance runs. CPUs that are configured can be set
|
|
online by the Linux instance.
|
|
This column contains data only if your hardware system and hypervisor support
|
|
dynamic CPU resource allocation.
|
|
<DT id="11"><B>POLARIZATION</B>
|
|
|
|
<DD>
|
|
This column contains data for Linux instances that run on virtual hardware with
|
|
a hypervisor that can switch the CPU dispatching mode (polarization). The
|
|
polarization can be:
|
|
<DL COMPACT><DT id="12"><DD>
|
|
<DL COMPACT>
|
|
<DT id="13"><B>horizontal</B>
|
|
|
|
<DD>
|
|
The workload is spread across all available CPUs.
|
|
<DT id="14"><B>vertical</B>
|
|
|
|
<DD>
|
|
The workload is concentrated on few CPUs.
|
|
</DL>
|
|
<P>
|
|
|
|
For vertical polarization, the column also shows the degree of concentration,
|
|
high, medium, or low. This column contains data only if your hardware system
|
|
and hypervisor support CPU polarization.
|
|
</DL>
|
|
|
|
<DT id="15"><B>MAXMHZ</B>
|
|
|
|
<DD>
|
|
Maximum megahertz value for the CPU. Useful when <B>lscpu</B> is used as hardware
|
|
inventory information gathering tool. Notice that the megahertz value is
|
|
dynamic, and driven by CPU governor depending on current resource need.
|
|
<DT id="16"><B>MINMHZ</B>
|
|
|
|
<DD>
|
|
Minimum megahertz value for the CPU.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="17"><B>-a</B>,<B> --all</B>
|
|
|
|
<DD>
|
|
Include lines for online and offline CPUs in the output (default for <B>-e</B>).
|
|
This option may only be specified together with option <B>-e</B> or <B>-p</B>.
|
|
<DT id="18"><B>-B</B>,<B> --bytes</B>
|
|
|
|
<DD>
|
|
Print the sizes in bytes rather than in a human-readable format.
|
|
<DT id="19"><B>-b</B>,<B> --online</B>
|
|
|
|
<DD>
|
|
Limit the output to online CPUs (default for <B>-p</B>).
|
|
This option may only be specified together with option <B>-e</B> or <B>-p</B>.
|
|
<DT id="20"><B>-C</B>,<B> --caches</B>[=<I>list</I>]
|
|
|
|
<DD>
|
|
Display details about CPU caches. For details about available information see <B>--help</B>
|
|
output.
|
|
<P>
|
|
If the <I>list</I> argument is omitted, all columns for which data is available
|
|
are included in the command output.
|
|
<P>
|
|
When specifying the <I>list</I> argument, the string of option, equal sign (=), and
|
|
<I>list</I> must not contain any blanks or other whitespace.
|
|
Examples: '<B>-C=NAME,ONE-SIZE</B>' or '<B>--caches=NAME,ONE-SIZE</B>'.
|
|
<DT id="21"><B>-c</B>,<B> --offline</B>
|
|
|
|
<DD>
|
|
Limit the output to offline CPUs.
|
|
This option may only be specified together with option <B>-e</B> or <B>-p</B>.
|
|
<DT id="22"><B>-e</B>,<B> --extended</B>[=<I>list</I>]
|
|
|
|
<DD>
|
|
Display the CPU information in human-readable format.
|
|
<P>
|
|
If the <I>list</I> argument is omitted, all columns for which data is available
|
|
are included in the command output.
|
|
<P>
|
|
When specifying the <I>list</I> argument, the string of option, equal sign (=), and
|
|
<I>list</I> must not contain any blanks or other whitespace.
|
|
Examples: '<B>-e=cpu,node</B>' or '<B>--extended=cpu,node</B>'.
|
|
<DT id="23"><B>-h</B>,<B> --help</B>
|
|
|
|
<DD>
|
|
Display help text and exit.
|
|
<DT id="24"><B>-J</B>,<B> --json</B>
|
|
|
|
<DD>
|
|
Use JSON output format for the default summary or extended output (see <B>--extended</B>).
|
|
<DT id="25"><B>-p</B>,<B> --parse</B>[=<I>list</I>]
|
|
|
|
<DD>
|
|
Optimize the command output for easy parsing.
|
|
<P>
|
|
If the <I>list</I> argument is omitted, the command output is compatible with earlier
|
|
versions of <B>lscpu</B>. In this compatible format, two commas are used to separate
|
|
CPU cache columns. If no CPU caches are identified the cache column is omitted.
|
|
<BR>
|
|
|
|
If the <I>list</I> argument is used, cache columns are separated with a colon (:).
|
|
<P>
|
|
When specifying the <I>list</I> argument, the string of option, equal sign (=), and
|
|
<I>list</I> must not contain any blanks or other whitespace.
|
|
Examples: '<B>-p=cpu,node</B>' or '<B>--parse=cpu,node</B>'.
|
|
<DT id="26"><B>-s</B>,<B> --sysroot </B><I>directory</I>
|
|
|
|
<DD>
|
|
Gather CPU data for a Linux instance other than the instance from which the
|
|
<B>lscpu</B> command is issued. The specified <I>directory</I> is the system root
|
|
of the Linux instance to be inspected.
|
|
<DT id="27"><B>-x</B>,<B> --hex</B>
|
|
|
|
<DD>
|
|
Use hexadecimal masks for CPU sets (for example "ff"). The default is to print
|
|
the sets in list format (for example 0,1). Note that before version 2.30 the mask
|
|
has been printed with 0x prefix.
|
|
<DT id="28"><B>-y</B>,<B> --physical</B>
|
|
|
|
<DD>
|
|
Display physical IDs for all columns with topology elements (core, socket, etc.).
|
|
Other than logical IDs, which are assigned by <B>lscpu</B>, physical IDs are
|
|
platform-specific values that are provided by the kernel. Physical IDs are not
|
|
necessarily unique and they might not be arranged sequentially.
|
|
If the kernel could not retrieve a physical ID for an element <B>lscpu</B> prints
|
|
the dash (-) character.
|
|
<P>
|
|
The CPU logical numbers are not affected by this option.
|
|
<DT id="29"><B>-V</B>,<B> --version</B>
|
|
|
|
<DD>
|
|
Display version information and exit.
|
|
<DT id="30"><B>--output-all</B>
|
|
|
|
<DD>
|
|
Output all available columns. This option must be combined with either
|
|
<B>--extended</B>, <B>--parse</B> or <B>--caches</B>.
|
|
|
|
</DL>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>BUGS</H2>
|
|
|
|
The basic overview of CPU family, model, etc. is always based on the first
|
|
CPU only.
|
|
<P>
|
|
Sometimes in Xen Dom0 the kernel reports wrong data.
|
|
<P>
|
|
On virtual hardware the number of cores per socket, etc. can be wrong.
|
|
<A NAME="lbAH"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
<PRE>
|
|
Cai Qian <<A HREF="mailto:qcai@redhat.com">qcai@redhat.com</A>>
|
|
Karel Zak <<A HREF="mailto:kzak@redhat.com">kzak@redhat.com</A>>
|
|
Heiko Carstens <<A HREF="mailto:heiko.carstens@de.ibm.com">heiko.carstens@de.ibm.com</A>>
|
|
</PRE>
|
|
|
|
<A NAME="lbAI"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+chcpu">chcpu</A></B>(8)
|
|
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>AVAILABILITY</H2>
|
|
|
|
The lscpu command is part of the util-linux package and is available from
|
|
<A HREF="https://www.kernel.org/pub/linux/utils/util-linux/.">https://www.kernel.org/pub/linux/utils/util-linux/.</A>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="31"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="32"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="33"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DL>
|
|
<DT id="34"><A HREF="#lbAE">COLUMNS</A><DD>
|
|
</DL>
|
|
<DT id="35"><A HREF="#lbAF">OPTIONS</A><DD>
|
|
<DT id="36"><A HREF="#lbAG">BUGS</A><DD>
|
|
<DT id="37"><A HREF="#lbAH">AUTHOR</A><DD>
|
|
<DT id="38"><A HREF="#lbAI">SEE ALSO</A><DD>
|
|
<DT id="39"><A HREF="#lbAJ">AVAILABILITY</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:18 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|