lstopo - Show the topology of the system (note that hwloc-bind(1)
provides a detailed explanation of the hwloc system; it should be read
before reading this man page).
[ options ]... [ filename ]
Include additional detail.
Opposite of --verbose (default).
Display hwloc logical indexes instead of physical/OS indexes (default).
These indexes are prefixed with "#".
The physical indexes of some objects (PU and Node by default, all
objects if verbose) will appear as object attribute "phys=...".
Display OS/physical indexes instead of hwloc logical indexes.
These indexes are prefixed with "p#" instead of "#".
Display the cpuset of each object.
Only display the cpuset of each object; do not display anything else
about the object.
Only show objects of the given type in the text output.
Ignore all objects of type <type> in the topology.
Do not show caches.
Do not show caches which do not have a hierarchical impact.
Do not consider administration limitations.
Do not show levels that do not have a hierarchical impact.
Read topology from XML file <path> (instead of discovering the
topology on the local machine). If <path> is "-", the standard input
is used. XML support must have been compiled in to hwloc for this
option to be usable.
Read topology from the chroot specified by <path> (instead of
discovering the topology on the local machine). This option is
generally only available on Linux.
Detect topology as seen by process <pid>, i.e. as if process <pid> did the
discovery itself, and show its current binding. Note that this can for instance
change the set of allowed processors. If 0 is given as pid, the current binding for the lstopo process will be shown.
Show existing processes as misc objects in the output. To avoid uselessly
cluttering the output, only processes that are restricted to some part of the
machine are shown. On Linux, kernel threads are not shown.
Simulate a fake hierarchy (instead of discovering the topology on the
local machine). If <specification> is "node:2 pu:3", the topology will
contain two NUMA nodes with 3 processing units in each of them.
Set size of text font.
Set size of margin between elements.
Horizontal graphic layout instead of nearly 4/3 ratio.
Vertical graphic layout instead of nearly 4/3 ratio.
Report version and exit.
lstopo is capable of displaying a topological map of the system in a
variety of different output formats. If no filename is specified and
the DISPLAY environment variable is set, lstopo displays the map in a
graphical window. If no filename is specified and the DISPLAY
environment variable is
set, a text summary is displayed.
The filename specified directly implies the output format that will be
used; see the OUTPUT FORMATS section, below. Output formats that
support color will indicate specific characteristics about individual
CPUs by their color; see the COLORS section, below.
The filename on the command line determines the format of the output.
There are a few filenames that indicate specific output formats and
devices (e.g., a filename of "-" will output a text summary to
stdout), but most filenames indicate the desired output format by
their suffix (e.g., "topo.png" will output a PNG-format file).
Send a text summary to stdout.
Send a text summary to stdout. It is effectively the same as
If the filename ends in ".txt", lstopo outputs an ASCII art
representation of the map.
If the entire filename is "-.txt", lstopo outputs the same ASCII art
representation as other ".txt" filenames, but with two exceptions: 1)
the output is sent to stdout, and 2) if colors are supported on the
terminal, the ASCII art will be colorized.
If the filename ends in ".fig", lstopo outputs a representation of the
map that can be loaded in Xfig.
If the filename ends in ".pdf" and lstopo was compiled with the proper
support, lstopo outputs a PDF representation of the map.
If the filename ends in ".ps" and lstopo was compiled with the proper
support, lstopo outputs a Postscript representation of the map.
If the filename ends in ".png" and lstopo was compiled with the proper
support, lstopo outputs a PNG representation of the map.
If the filename ends in ".svg" and lstopo was compiled with the proper
support, lstopo outputs an SVG representation of the map.
If the filename ends in ".xml" and lstopo was compiled with the proper
support, lstopo outputs an XML representation of the map.
It may be reused later, even on another machine, with lstopo --xml,
the HWLOC_XMLFILE environment variable, or the hwloc_topology_set_xml()
See the output of "lstopo --help" for a specific list of what
graphical output formats are supported in your hwloc installation.
Individual CPUs are colored in the semi-graphical and graphical output
formats to indicate different characteristics:
The CPU is in the current CPU binding mask.
The CPU is in the allowed set (see below), but it is not in the
current CPU binding mask.
The CPU is not in the allowed set (see below).
The CPU is offline (not all OS's support displaying offline CPUs).
The "allowed set" is the set of CPUs to which the current process is
allowed to bind. The allowed set is usually either inherited from the
parent process or set by administrative qpolicies on the system. Linux
cpusets are one example of limiting the allowed set for a process and
its children to be less than the full set of CPUs on the system.
Different processes may therefore have different CPUs in the allowed
set. Hence, invoking lstopo in different contexts and/or as different
users may display different colors for the same individual CPUs (e.g.,
running lstopo in one context may show a specific CPU as red, but
running lstopo in a different context may show the same CPU as white).
In its graphical output, lstopo uses simple rectangular heuristics
to try to achieve a 4/3 ratio between width and height. However,
in the particular case of NUMA nodes, the layout is always a flat
rectangle, to avoid letting the user believe any particular NUMA
topology (lstopo is not able to render that yet).
To display the machine topology in text mode:
To display in graphical mode (assuming that the DISPLAY environment
variable is set to a relevant value):
To export the topology to a PNG file:
To export a XML file on a machine and later display the corresponding
graphic output on another machine:
machine1$ lstopo file.xml
<transfer file.xml from machine1 to machine2>
machine2$ lstopo --xml file.xml
To display a summary of the topology:
To get more details about the topology:
To only show cores:
lstopo --only core
To show cpusets:
To only show the cpusets of sockets:
lstopo --only socket --cpuset-only
Simulate a fake hierarchy; this example shows with 2 NUMA nodes of 2
lstopo --synthetic "n:2 2"
To count the number of logical processors in the system