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