]> git.ipfire.org Git - thirdparty/util-linux.git/blame - sys-utils/lscpu.1
Merge branch 'races' of git://github.com/kerolasa/lelux-utiliteetit
[thirdparty/util-linux.git] / sys-utils / lscpu.1
CommitLineData
7ff986d3 1.TH LSCPU 1 "January 2013" "util-linux" "User Commands"
5dd7507c 2.SH NAME
67f1d481 3lscpu \- display information about the CPU architecture
5dd7507c 4.SH SYNOPSIS
e7a5546c 5.B lscpu
7ff986d3 6.RB [ \-a | \-b | \-c "] [" \-x "] [" \-s " \fIdirectory\fP] [" \-e [=\fIlist\fP]| \-p [=\fIlist\fP]]
67f1d481
HC
7.br
8.B lscpu
9.BR \-h | \-V
5dd7507c
CQ
10.SH DESCRIPTION
11.B lscpu
7ff986d3 12gathers CPU architecture information from sysfs and /proc/cpuinfo. The
67f1d481 13command output can be optimized for parsing or for easy readability by humans.
67f1d481 14The information includes, for example, the number of CPUs, threads, cores,
7ff986d3 15sockets, and Non-Uniform Memory Access (NUMA) nodes. There is also information
67f1d481
HC
16about the CPU caches and cache sharing, family, model, bogoMIPS, byte order,
17and stepping.
18
7ff986d3
BS
19Options that result in an output table have a \fIlist\fP argument. Use this
20argument to customize the command output. Specify a comma-separated list of
67f1d481 21column labels to limit the output table to only the specified columns, arranged
7ff986d3 22in the specified order. See \fBCOLUMNS\fP for a list of valid column labels. The
67f1d481 23column labels are not case sensitive.
ba45d8c1 24
7ff986d3 25Not all columns are supported on all architectures. If an unsupported column is
67f1d481 26specified, \fBlscpu\fP prints the column but does not provide any data for it.
ba45d8c1 27
67f1d481 28.SS COLUMNS
4f642863
AT
29Note that topology elements (core, socket, etc.) use sequential unique ID
30starting from zero, but CPU logical numbers follow kernel where is no guarantee
31of the sequential numbering.
67f1d481
HC
32.TP
33.B CPU
34The logical CPU number of a CPU as used by the Linux kernel.
35.TP
36.B CORE
7ff986d3 37The logical core number. A core can contain several CPUs.
67f1d481
HC
38.TP
39.B SOCKET
7ff986d3 40The logical socket number. A socket can contain several cores.
67f1d481
HC
41.TP
42.B BOOK
7ff986d3 43The logical book number. A book can contain several sockets.
67f1d481
HC
44.TP
45.B NODE
7ff986d3 46The logical NUMA node number. A node may contain several books.
67f1d481
HC
47.TP
48.B CACHE
49Information about how caches are shared between CPUs.
50.TP
51.B ADDRESS
52The physical address of a CPU.
53.TP
54.B ONLINE
55Indicator that shows whether the Linux instance currently makes use of the CPU.
56.TP
57.B CONFIGURED
58Indicator that shows if the hypervisor has allocated the CPU to the virtual
7ff986d3 59hardware on which the Linux instance runs. CPUs that are configured can be set
67f1d481
HC
60online by the Linux instance.
61This column contains data only if your hardware system and hypervisor support
62dynamic CPU resource allocation.
63.TP
64.B POLARIZATION
65This column contains data for Linux instances that run on virtual hardware with
7ff986d3 66a hypervisor that can switch the CPU dispatching mode (polarization). The
67f1d481
HC
67polarization can be:
68.RS
69.TP 12
70.B horizontal\fP
71The workload is spread across all available CPUs.
72.TP 12
73.B vertical
74The workload is concentrated on few CPUs.
75.P
76For vertical polarization, the column also shows the degree of concentration,
7ff986d3 77high, medium, or low. This column contains data only if your hardware system
67f1d481 78and hypervisor support CPU polarization.
e4b768c7
SK
79.TP
80.B MMHZ
81Maximum megaherz value for the cpu. Useful when lscpu is used as hardware
d640dd94 82inventory information gathering tool. Notice that the megahertz value is
e4b768c7 83dynamic, and driven by CPU governor depending on current resource need.
67f1d481 84.RE
5dd7507c 85.SH OPTIONS
e7a5546c 86.TP
0ad29ff6 87.BR \-a , " \-\-all"
7ff986d3
BS
88Include lines for online and offline CPUs in the output (default for \fB-e\fR).
89This option may only be specified together with option \fB-e\fR or \fB-p\fR.
23e9e95a
KZ
90.TP
91.BR \-b , " \-\-online"
7ff986d3
BS
92Limit the output to online CPUs (default for \fB-p\fR).
93This option may only be specified together with option \fB-e\fR or \fB-p\fR.
7afc2387
HC
94.TP
95.BR \-c , " \-\-offline"
7ff986d3
BS
96Limit the output to offline CPUs.
97This option may only be specified together with option \fB-e\fR or \fB-p\fR.
ba45d8c1 98.TP
7ff986d3 99.BR \-e , " \-\-extended" [=\fIlist\fP]
67f1d481 100Display the CPU information in human readable format.
ba45d8c1 101
67f1d481
HC
102If the \fIlist\fP argument is omitted, all columns for which data is available
103are included in the command output.
ba45d8c1 104
67f1d481 105When specifying the \fIlist\fP argument, the string of option, equal sign (=), and
7ff986d3 106\fIlist\fP must not contain any blanks or other whitespace.
67f1d481 107Examples: '\fB-e=cpu,node\fP' or '\fB--extended=cpu,node\fP'.
ba45d8c1 108.TP
e7a5546c 109.BR \-h , " \-\-help"
b4362b6f 110Display help text and exit.
e7a5546c 111.TP
7ff986d3 112.BR \-p , " \-\-parse" [=\fIlist\fP]
67f1d481 113Optimize the command output for easy parsing.
477251f8 114
67f1d481 115If the \fIlist\fP argument is omitted, the command output is compatible with earlier
7ff986d3
BS
116versions of \fBlscpu\fP. In this compatible format, two commas are used to separate
117CPU cache columns. If no CPU caches are identified the cache column is omitted.
ba45d8c1 118.br
67f1d481 119If the \fIlist\fP argument is used, cache columns are separated with a colon (:).
477251f8 120
67f1d481 121When specifying the \fIlist\fP argument, the string of option, equal sign (=), and
7ff986d3 122\fIlist\fP must not contain any blanks or other whitespace.
67f1d481 123Examples: '\fB-p=cpu,node\fP' or '\fB--parse=cpu,node\fP'.
9b207793
BS
124.TP
125.BR \-s , " \-\-sysroot " \fIdirectory\fP
67f1d481 126Gather CPU data for a Linux instance other than the instance from which the
7ff986d3 127\fBlscpu\fP command is issued. The specified \fIdirectory\fP is the system root
67f1d481 128of the Linux instance to be inspected.
4f912c6a
KZ
129.TP
130.BR \-x , " \-\-hex"
67f1d481
HC
131Use hexadecimal masks for CPU sets (for example 0x3). The default is to print
132the sets in list format (for example 0,1).
44de912c
HC
133.TP
134.BR \-V , " \-\-version"
67f1d481 135Display version information and exit.
5dd7507c 136.SH BUGS
7ff986d3 137The basic overview of CPU family, model, etc. is always based on the first
7e03f383 138CPU only.
c8b64f6d 139
9b207793 140Sometimes in Xen Dom0 the kernel reports wrong data.
67f1d481
HC
141
142On virtual hardware the number of cores per socket, etc. can be wrong.
5dd7507c 143.SH AUTHOR
7e03f383 144.nf
5dd7507c 145Cai Qian <qcai@redhat.com>
7e03f383 146Karel Zak <kzak@redhat.com>
67f1d481 147Heiko Carstens <heiko.carstens@de.ibm.com>
7e03f383 148.fi
0b57c6c2 149.SH "SEE ALSO"
67f1d481 150.BR chcpu (8)
5dd7507c 151.SH AVAILABILITY
601d12fb
KZ
152The lscpu command is part of the util-linux package and is available from
153ftp://ftp.kernel.org/pub/linux/utils/util-linux/.