2 .\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH LGRPINFO 1 "April 9, 2016"
8 lgrpinfo \- display information about locality groups
12 \fBlgrpinfo\fR [\fB-aceGlLmrt\fR] [\fB-u \fR\fIunit\fR] [\fB-C\fR | \fB-P\fR] \fIlgrp\fR ...
17 \fBlgrpinfo\fR \fB-h\fR
22 \fBlgrpinfo\fR \fB-I\fR [\fB-c\fR] [\fB-G\fR] [\fB-C\fR | \fB-P\fR] \fIlgrp\fR ...
27 \fBlgrpinfo\fR [\fB-T\fR] [\fB-aceGlLmr\fR] [\fB-u \fR\fIunit\fR]
32 \fBlgrpinfo\fR prints information about the locality group (\fBlgroup\fR)
33 hierarchy and its contents.
36 An lgroup represents the set of CPU and memory-like hardware devices that are
37 at most some distance (latency) apart from each other. All lgroups in the
38 system are identified by a unique integer called an \fBlgroup ID\fR.
41 lgroups are organized into a hierarchy to facilitate finding the nearest
42 resources. Leaf lgroups each contain a set of resources that are closest
43 (local) to each other. Each parent lgroup in the hierarchy contains the
44 resources of its child lgroups plus their next nearest resources. Finally, the
45 \fBroot\fR lgroup contains all the resources in the domain within the largest
49 A Uniform Memory Access (UMA) machine is simply represented by the root lgroup.
50 A Non Uniform Memory Access (NUMA) machine is represented by a hierarchy of
51 lgroups to show the corresponding levels of locality. For example, a NUMA
52 machine with two latencies (local and remote) has an \fBlgroup\fR hierarchy
53 consisting of two levels with its leaves and the root.
56 Every application thread is assigned a \fBhome\fR lgroup. When the system needs
57 to allocate a CPU or memory resource for a thread, it searches lgroup hierarchy
58 from the thread's home lgroup for the closest available resources to the
59 thread's home. See \fBplgrp\fR(1) for details.
62 Without arguments, \fBlgrpinfo\fR prints general information about all lgroups
63 in the system. If any lgroup IDs are specified on the command line, the command
64 only prints information about the specified lgroups. Various options control
65 which lgroups are displayed and the exact information that is printed for each
69 lgroups can be specified on the command line as lgroup IDs or by using specific
70 keywords. See \fBOPERANDS\fR.
73 You can combine options together and the order in which options are specified
74 is not important. Lowercase options select what information should be printed
78 Invoking \fBlgrpinfo\fR without arguments is equivalent to:
82 lgrpinfo -c -e -l -m -r -t all
89 The following options are supported:
96 Print topology, CPU, memory, load and latency information.
98 This option is a shorthand for
102 lgrpinfo -t -c -e -m -r -l -L
107 unless \fB-T\fR is specified as well. When \fB-T\fR is specified, the \fB-t\fR
108 option is not included.
117 Print CPU information.
128 Replace each lgroup in the list with its children.
130 This option cannot be used with the \fB-P\fR or the \fB-T\fR option. When no
131 arguments are specified, this option is applied to the lgroups displayed by
141 Print lgroup load average. The lgroup load averages are only displayed for leaf
153 Print OS view of lgroup hierarchy.
155 By default, the caller's view of the lgroup hierarchy is displayed which only
156 includes what the caller can use, for example, only the CPUs in the caller's
157 processor set is displayed. See \fBlgrp_init\fR(3LGRP) on the operating system
158 and the caller's view.
167 Print short help message and exit.
176 Print matching IDs only.
178 This option is intended for scripts and can be used with \fB-c\fR, \fB-G\fR,
179 and \fB-C\fR or \fB-P\fR. If \fB-c\fR is specified, print list of CPUs
180 contained in all matching lgroups. Otherwise, the IDs for the matching lgroups
181 is displayed. See \fBEXAMPLES\fR.
183 When no arguments are specified, this option is applied to the lgroups
184 displayed, which, by default is all lgroups.
193 Print information about lgroup latencies.
195 The latency value specified for each lgroup is defined by the operating system
196 and is platform-specific. It can only be used for relative comparison of
197 lgroups on the running system. It does not necessarily represent the actual
198 latency between hardware devices and might not be applicable across platforms.
207 Print the lgroup latency table. The lgroup latency table displays the relative
208 latency from each lgroup to each of the other lgroups including itself.
217 Print memory information.
219 Memory sizes are scaled to the unit of measure that yields an integer from
220 \fB0\fR to \fB1023\fR unless the \fB-u\fR option is specified as well. The
221 fractional part of the number is only displayed for values less than \fB10\fR.
222 This behavior is similar to using the \fB-h\fR option of \fBls\fR(1) or
223 \fBdf\fR(8) to display a human readable format.
234 Replace each lgroup in the list with its parents.
236 This option cannot be used with the \fB-C\fR or \fB-T\fR option. When no
237 arguments are specified, this option is applied to the lgroups displayed,
238 which, by default is all lgroups.
247 Print information about lgroup resources.
249 The resources are represented by a set of lgroups in which each member lgroup
250 directly contains CPU and memory resources. If \fB-T\fR is specified as well,
251 only information about resources of the intermediate lgroups is displayed.
260 Print information about lgroup topology.
271 Print the lgroup topology of a system graphically as a tree. This option can
272 only be used with the \fB-a\fR, \fB-c\fR, \fB-e\fR, \fB-G\fR,
273 \fB-l\fR,\fB-L\fR, \fB-m\fR, \fB-r\fR, and \fB-u\fR options. It only prints
274 lgroup resources for intermediate lgroups when used with the \fB-r\fR. The
275 \fB-t\fR option is omitted when \fB-T\fR is used with \fB-a\fR. No information
276 is printed for the \fBroot\fR lgroup unless it is the only lgroup.
282 \fB\fB-u\fR \fIunits\fR\fR
285 Specify memory units. Units should be b, k, m, g, t, p, or e for bytes,
286 kilobytes, megabytes, gigabytes, terabytes, petabytes, or exabytes
287 respectively. The fractional part of the number is only displayed for values
288 less than 10. This behavior is similar to using the \fB-h\fR option of
289 \fBls\fR(1) or \fBdf\fR(8) to display a human readable format.
294 The following operands are supported:
301 lgroups can be specified on the command line as lgroup ID, by using one of the
320 All intermediate lgroups. An intermediate lgroup is an lgroup that has a parent
330 All leaf lgroups. A leaf lgroup is an lgroup that has no children in the lgroup
340 Root lgroup. Root lgroup contains all the resources in the domain within the
341 largest latency and has no parent lgroup.
348 If an invalid lgroup is specified, the lgrpinfo command prints a message on
349 standard error showing the invalid ID and continues processing other lgroups
350 specified on the command line. When none of the specified lgroups are valid,
351 \fBlgrpinfo\fR exits with an exit status of \fB2\fR.
354 \fBExample 1 \fRPrinting Information about lgroups
357 The following example prints general information about lgroups in the system.
361 In this example, the system is a 2 CPU AMD Opteron machine with two nodes, each
362 having one CPU and 2 gigabytes of memory. Each of these nodes is represented by
363 a leaf lgroup. The root lgroup contains all the resources in the machine:
372 Memory: installed 4.0G, allocated 2.2G, free 1.8G
373 Lgroup resources: 1 2 (CPU); 1 2 (memory)
376 Children: none, Parent: 0
378 Memory: installed 2.0G, allocated 1.2G, free 788M
379 Lgroup resources: 1 (CPU); 1 (memory)
383 Children: none, Parent: 0
385 Memory: installed 2.0G, allocated 1017M, free 1.0G
386 Lgroup resources: 2 (CPU); 2 (memory)
394 \fBExample 2 \fRPrinting lgroup Topology
397 The following example prints the lgroup topology tree on a 4 CPU AMD Opteron
418 \fBExample 3 \fRPrinting lgroup Topology
421 The following example prints the lgroup topology tree, resources, memory and
422 CPU information on a 2 CPU AMD Opteron machine:
431 | Memory: installed 2.0G, allocated 1.2G, free 790M
436 Memory: installed 2.0G, allocated 1019M, free 1.0G
454 \fBExample 4 \fRPrinting lgroup IDs
457 The following example prints lgroup IDs for children of the root lgroup:
462 $ lgrpinfo -I -C root
469 \fBExample 5 \fRPrinting CPU IDs
472 The following example prints CPU IDs for all CPUs in lgroup 1:
484 \fBExample 6 \fRPrinting Information about lgropu Latencies
487 The following example prints information about lgroup latencies:
505 The following exit values are returned:
512 Successful completion.
521 Unable to get lgroup information from the system.
530 All lgroups specified are invalid.
544 See \fBattributes\fR(5) for descriptions of the following attributes:
552 ATTRIBUTE TYPE ATTRIBUTE VALUE
554 Interface Stability See below.
559 The human readable output is Unstable.
562 \fBls\fR(1), \fBplgrp\fR(1), \fBpmap\fR(1), \fBproc\fR(1), \fBps\fR(1),
563 \fBdf\fR(8), \fBprstat\fR(8), \fBlgrp_init\fR(3LGRP), \fBliblgrp\fR(3LIB),
564 \fBproc\fR(4), \fBattributes\fR(5)