HWLOC-INFO(1) | hwloc | HWLOC-INFO(1) |
hwloc-info - Show some information about some objects, a topology or supported features
hwloc-info [ options ]... <object>...
hwloc-info [ options ] root hwloc-info [ options ] [ topology | levels | support ]
<object>... may be a space-separated list of target objects to query. The program reports all information about one object before looking at the next one:
$ hwloc-info core:2 package:1 pu:all
Core L#2
type = Core
...
Package L#1
...
PU L#0
...
PU L#1
...
The list may also contain special keywords such as:
root for the topology root object.
levels for information about topology levels (default if no target
object is given, identical to --topology).
topology for topology info attributes stored in the root object (for
forward compatibility with topology info attrs in hwloc 3.0).
support for information about supported features (identical to
--support).
Real targets and special keywords may be combined:
$ hwloc-info core:2 topology pu:3 levels
Note that hwloc(7) provides a detailed explanation of the hwloc system and of valid <object> formats; it should be read before reading this man page.
If <path> is a file, it may be a XML file exported by a previous hwloc program. If <path> is "-", the standard input may be used as a XML file.
On Linux, <path> may be a directory containing the topology files gathered from another machine topology with hwloc-gather-topology.
On x86, <path> may be a directory containing a cpuid dump gathered with hwloc-gather-cpuid.
When the archivemount program is available, <path> may also be a tarball containing such Linux or x86 topology files.
Only the value is reported, any other prefix or object name is ignored, so that the output may easily be used by other tools.
This option also works on topology information but it is ignored for levels and support keywords.
Some special values matching multiple types may also be given: kind=normal (CPU objects, including caches), kind=cpu (CPU objects, excluding caches), kind=cache (all caches, including memory-side caches), kind=memory (NUMA nodes or memory-side caches), kind=io (IO objects), kind=all (all objects). See also Object Kind in Terms and Definitions in the documentation. The prefix kind= may be omitted if there is no ambiguity.
If multiple ancestors match, they are reported from the deepest to the highest in the topology. Adding --first will only show the first one.
Some special values matching multiple types may also be given: kind=normal (CPU objects, including caches), kind=cpu (CPU objects, excluding caches), kind=cache (all caches, including memory-side caches), kind=memory (NUMA nodes or memory-side caches), kind=io (IO objects), kind=all (all objects). See also Object Kind in Terms and Definitions in the documentation. The prefix kind= may be omitted if there is no ambiguity.
If multiple objects match, they are reported in a depth-first order (first child, then its children, etc., then second child, etc.). Adding --first will only show the first one.
This option enables --local-memory.
<name> may be suffixed with flags to tune the selection of best nodes, for instance as bandwidth,strict,default. default means that all local nodes are reported if no best could be found. strict means that nodes are selected only if their performance is the best for all the input CPUs. On a dual-socket machine with HBM in each socket, both HBMs are the best for their local socket, but not for the remote socket. Hence both HBM are also considered best for the entire machine by default, but none if strict.
Beware that restricting the PUs in a topology may change the logical indexes of many objects, including NUMA nodes.
Beware that restricting the NUMA nodes in a topology may change the logical indexes of many objects, including PUs.
Beware that restricting the topology may change the logical indexes of many objects, including PUs and NUMA nodes.
<kind> specifies the filtering behavior. If "none" or not specified, all objects of the given type are removed. If "all", all objects are kept as usual. If "structure", objects are kept when they bring structure to the topology. If "important" (only applicable to I/O and Misc), only important objects are kept. See hwloc_topology_set_type_filter() for more details.
hwloc-info displays information about the specified objects. It is intended to be used with tools such as grep for filtering certain attribute lines. When no object is specified, or when --topology is passed, hwloc-info prints a summary of the topology. When --support is passed, hwloc-info lists the supported features for the topology.
Objects may be specified as location tuples, as explained in hwloc(7). However hexadecimal bitmasks are not accepted since they may correspond to multiple objects.
NOTE: It is highly recommended that you read the hwloc(7) overview page before reading this man page. Most of the concepts described in hwloc(7) directly apply to the hwloc-calc utility.
To display information about each package:
$ hwloc-info package:all
Package L#0
logical index = 0
...
To display information about the core whose physical index is 2:
$ hwloc-info -p core:2
Core L#1
logical index = 1
os index = 2
...
To list the OS devices that are of subtype OpenCL:
$ hwloc-info -s "os[OpenCL]:all"
CoProc:6
CoProc:8
To find the PCI bus ID of PCI devices containing OpenCL devices:
$ hwloc-info --ancestor PCI --get-attr "attr PCI bus id"
'os[opencl]:all'
0000:05:00.0
0000:42:00.0
To list the NUMA nodes that are local a PU:
$ hwloc-info --local-memory pu:25
NUMANode L#6 = local memory #0 of PU L#25
type = NUMANode
...
NUMANode L#7 = local memory #1 of PU L#25
type = NUMANode
...
To show the best-bandwidth node(s) among NUMA nodes local to a PU:
$ hwloc-info --local-memory --best-memattr bandwidth pu:25
NUMANode L#7 = local memory #1 of PU L#25
type = NUMANode
...
to find where a NUMA node is attached in the hierarchy of CPU cores:
$ hwloc-info --ancestor kind=normal --first -s numa:1
Package:0
To see levels and topology info attributes stored in the root object:
$ hwloc-info levels topology
depth 0: 1 Machine (type #0)
depth 1: 1 Package (type #1)
depth 2: 2 Core (type #2)
depth 3: 4 PU (type #3)
Special depth -3: 1 NUMANode (type #13)
info Backend = Linux
info LinuxCgroup = /user/622
info Architecture = x86_64
info hwlocVersion = 3.0.0a1-git
hwloc(7), lstopo(1), hwloc-calc(1), hwloc-bind(1), hwloc-ps(1)
September 26, 2024 | 2.11.2 |