1lgrpinfo(1) User Commands lgrpinfo(1)
2
3
4
6 lgrpinfo - display information about locality groups
7
9 lgrpinfo [-aceGlLmrt] [-u unit] [-C | -P] lgrp ...
10
11
12 lgrpinfo -h
13
14
15 lgrpinfo -I [-c] [-G] [-C | -P] lgrp ...
16
17
18 lgrpinfo [-T] [-aceGlLmr] [-u unit]
19
20
22 lgrpinfo prints information about the locality group (lgroup) hierarchy
23 and its contents.
24
25
26 An lgroup represents the set of CPU and memory-like hardware devices
27 that are at most some distance (latency) apart from each other. All
28 lgroups in the system are identified by a unique integer called an
29 lgroup ID.
30
31
32 lgroups are organized into a hierarchy to facilitate finding the near‐
33 est resources. Leaf lgroups each contain a set of resources that are
34 closest (local) to each other. Each parent lgroup in the hierarchy con‐
35 tains the resources of its child lgroups plus their next nearest
36 resources. Finally, the root lgroup contains all the resources in the
37 domain within the largest latency.
38
39
40 A Uniform Memory Access (UMA) machine is simply represented by the root
41 lgroup. A Non Uniform Memory Access (NUMA) machine is represented by a
42 hierarchy of lgroups to show the corresponding levels of locality. For
43 example, a NUMA machine with two latencies (local and remote) has an
44 lgroup hierarchy consisting of two levels with its leaves and the root.
45
46
47 Every application thread is assigned a home lgroup. When the system
48 needs to allocate a CPU or memory resource for a thread, it searches
49 lgroup hierarchy from the thread's home lgroup for the closest avail‐
50 able resources to the thread's home. See plgrp(1) for details.
51
52
53 Without arguments, lgrpinfo prints general information about all
54 lgroups in the system. If any lgroup IDs are specified on the command
55 line, the command only prints information about the specified lgroups.
56 Various options control which lgroups are displayed and the exact
57 information that is printed for each lgroup.
58
59
60 lgroups can be specified on the command line as lgroup IDs or by using
61 specific keywords. See OPERANDS.
62
64 You can combine options together and the order in which options are
65 specified is not important. Lowercase options select what information
66 should be printed about lgroups.
67
68
69 Invoking lgrpinfo without arguments is equivalent to:
70
71 lgrpinfo -c -e -l -m -r -t all
72
73
74
75
76 The following options are supported:
77
78 -a Print topology, CPU, memory, load and latency information.
79
80 This option is a shorthand for
81
82 lgrpinfo -t -c -e -m -r -l -L
83
84
85 unless -T is specified as well. When -T is specified, the
86 -t option is not included.
87
88
89 -c Print CPU information.
90
91 This is the default.
92
93
94 -C Replace each lgroup in the list with its children.
95
96 This option cannot be used with the -P or the -T option.
97 When no arguments are specified, this option is applied to
98 the lgroups displayed by default.
99
100
101 -e Print lgroup load average. The lgroup load averages are
102 only displayed for leaf lgroups.
103
104 This is the default.
105
106
107 -G Print OS view of lgroup hierarchy.
108
109 By default, the caller's view of the lgroup hierarchy is
110 displayed which only includes what the caller can use, for
111 example, only the CPUs in the caller's processor set is
112 displayed. See lgrp_init(3LGRP) on the operating system and
113 the caller's view.
114
115
116 -h Print short help message and exit.
117
118
119 -I Print matching IDs only.
120
121 This option is intended for scripts and can be used with
122 -c, -G, and -C or -P. If -c is specified, print list of
123 CPUs contained in all matching lgroups. Otherwise, the IDs
124 for the matching lgroups is displayed. See EXAMPLES.
125
126 When no arguments are specified, this option is applied to
127 the lgroups displayed, which, by default is all lgroups.
128
129
130 -l Print information about lgroup latencies.
131
132 The latency value specified for each lgroup is defined by
133 the operating system and is platform-specific. It can only
134 be used for relative comparison of lgroups on the running
135 system. It does not necessarily represent the actual
136 latency between hardware devices and might not be applica‐
137 ble across platforms.
138
139
140 -L Print the lgroup latency table. The lgroup latency table
141 displays the relative latency from each lgroup to each of
142 the other lgroups including itself.
143
144
145 -m Print memory information.
146
147 Memory sizes are scaled to the unit of measure that yields
148 an integer from 0 to 1023 unless the -u option is specified
149 as well. The fractional part of the number is only dis‐
150 played for values less than 10. This behavior is similiar
151 to using the -h option of ls(1) or df(1M) to display a
152 human readable format.
153
154 This is the default.
155
156
157 -P Replace each lgroup in the list with its parents.
158
159 This option cannot be used with the -C or -T option. When
160 no arguments are specified, this option is applied to the
161 lgroups displayed, which, by default is all lgroups.
162
163
164 -r Print information about lgroup resources.
165
166 The resources are represented by a set of lgroups in which
167 each member lgroup directly contains CPU and memory
168 resources. If -T is specified as well, only information
169 about resources of the intermediate lgroups is displayed.
170
171
172 -t Print information about lgroup topology.
173
174 This is the default.
175
176
177 -T Print the lgroup topology of a system graphically as a
178 tree. This option can only be used with the -a, -c, -e, -G,
179 -l,-L, -m, -r, and -u options. It only prints lgroup
180 resources for intermediate lgroups when used with the -r.
181 The -t option is omitted when -T is used with -a. No infor‐
182 mation is printed for the root lgroup unless it is the only
183 lgroup.
184
185
186 -u units Specify memory units. Units should be b, k, m, g, t, p, or
187 e for bytes, kilobytes, megabytes, gigabytes, terabytes,
188 petabytes, or exabytes respectively. The fractional part of
189 the number is only displayed for values less than 10. This
190 behavior is similiar to using the -h option of ls(1) or
191 df(1M) to display a human readable format.
192
193
195 The following operands are supported:
196
197 lgrp lgroups can be specified on the command line as lgroup ID, by
198 using one of the following keywords:
199
200 all All lgroups.
201
202 This is the default.
203
204
205 intermediate All intermediate lgroups. An intermediate
206 lgroup is an lgroup that has a parent and chil‐
207 dren.
208
209
210 leaves All leaf lgroups. A leaf lgroup is an lgroup
211 that has no children in the lgroup hierarchy.
212
213
214 root Root lgroup. Root lgroup contains all the
215 resources in the domain within the largest
216 latency and has no parent lgroup.
217
218
219
220
221 If an invalid lgroup is specified, the lgrpinfo command prints a mes‐
222 sage on standard error showing the invalid ID and continues processing
223 other lgroups specified on the command line. When none of the specified
224 lgroups are valid, lgrpinfo exits with an exit status of 2.
225
227 Example 1 Printing Information about lgroups
228
229
230 The following example prints general information about lgroups in the
231 system.
232
233
234
235 In this example, the system is a 2 CPU AMD Opteron machine with two
236 nodes, each having one CPU and 2 gigabytes of memory. Each of these
237 nodes is represented by a leaf lgroup. The root lgroup contains all the
238 resources in the machine:
239
240
241 $ lgrpinfo
242 lgroup 0 (root):
243 Children: 1 2
244 CPUs: 0 1
245 Memory: installed 4.0G, allocated 2.2G, free 1.8G
246 Lgroup resources: 1 2 (CPU); 1 2 (memory)
247 Latency: 83
248 lgroup 1 (leaf):
249 Children: none, Parent: 0
250 CPU: 0
251 Memory: installed 2.0G, allocated 1.2G, free 788M
252 Lgroup resources: 1 (CPU); 1 (memory)
253 Load: 0.793
254 Latency: 56
255 lgroup 2 (leaf):
256 Children: none, Parent: 0
257 CPU: 1
258 Memory: installed 2.0G, allocated 1017M, free 1.0G
259 Lgroup resources: 2 (CPU); 2 (memory)
260 Load: 0.817
261 Latency: 56
262
263
264
265 Example 2 Printing lgroup Topology
266
267
268 The following example prints the lgroup topology tree on a 4 CPU AMD
269 Opteron machine:
270
271
272 $ lgrpinfo -T
273 0
274 |-- 5
275 | `-- 1
276 |-- 6
277 | `-- 2
278 |-- 7
279 | `-- 3
280 `-- 8
281 `-- 4
282
283
284
285 Example 3 Printing lgroup Topology
286
287
288 The following example prints the lgroup topology tree, resources, mem‐
289 ory and CPU information on a 2 CPU AMD Opteron machine:
290
291
292 $ lgrpinfo -Ta
293 0
294 |-- 1
295 | CPU: 0
296 | Memory: installed 2.0G, allocated 1.2G, free 790M
297 | Load: 0.274
298 | Latency: 56
299 `-- 2
300 CPU: 1
301 Memory: installed 2.0G, allocated 1019M, free 1.0G
302 Load: 0.937
303 Latency: 56
304
305 Lgroup latencies:
306
307 ------------
308 | 0 1 2
309 ------------
310 0 | 83 83 83
311 1 | 83 56 83
312 2 | 83 83 56
313 ------------
314
315
316
317 Example 4 Printing lgroup IDs
318
319
320 The following example prints lgroup IDs for children of the root
321 lgroup:
322
323
324 $ lgrpinfo -I -C root
325 1 2
326
327
328
329 Example 5 Printing CPU IDs
330
331
332 The following example prints CPU IDs for all CPUs in lgroup 1:
333
334
335 $ lgrpinfo -c -I 1
336 0
337
338
339
340 Example 6 Printing Information about lgropu Latencies
341
342
343 The following example prints information about lgroup latencies:
344
345
346 $ lgrpinfo -l
347 lgroup 0 (root):
348 Latency: 83
349 lgroup 1 (leaf):
350 Latency: 56
351 lgroup 2 (leaf):
352 Latency: 5
353
354
355
357 The following exit values are returned:
358
359 0 Successful completion.
360
361
362 1 Unable to get lgroup information from the system.
363
364
365 2 All lgroups specified are invalid.
366
367
368 3 Invalid syntax.
369
370
372 See attributes(5) for descriptions of the following attributes:
373
374
375
376
377 ┌─────────────────────────────┬─────────────────────────────┐
378 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
379 ├─────────────────────────────┼─────────────────────────────┤
380 │Availability │SUNWesu │
381 ├─────────────────────────────┼─────────────────────────────┤
382 │Interface Stability │See below. │
383 └─────────────────────────────┴─────────────────────────────┘
384
385
386 The human readable output is Unstable.
387
389 ls(1), plgrp(1), pmap(1), proc(1), ps(1), df(1M), prstat(1M),
390 lgrp_init(3LGRP), liblgrp(3LIB), proc(4), attributes(5)
391
392
393
394SunOS 5.11 11 Sep 2006 lgrpinfo(1)