lstopo-no-graphics
Display hardware topology in text
TLDR
Display the machine topology in a tree format
Display only physical cores (ignore logical processors)
Display the topology with physical indexes
Display help
SYNOPSIS
lstopo-no-graphics [options] [filename]
PARAMETERS
-h, --help
Show help message and exit.
-v, --verbose
Increase verbosity, showing more details about the topology.
-i <file>, --input <file>
Read topology from an XML file generated by a previous lstopo run, instead of detecting the current machine's topology.
-c, --cpuset
Display the cpuset for each object, showing which CPU cores are assigned to it.
-p, --physical
Show physical (OS-assigned) indexes for objects, rather than logical (hwloc-assigned) indexes.
-l, --logical
Show logical (hwloc-assigned) indexes for objects (this is the default behavior).
--no-io
Do not show I/O devices in the output.
--no-bridges
Do not show host bridges (PCI bridges) in the output.
--output-format <format>
Specify the output format explicitly. Supported formats include xml, ascii, plain, curses, console. This is implicitly handled by lstopo-no-graphics when a graphical output format is not specified.
--export-xml <file>
Export the discovered topology to the specified XML file.
[filename]
If provided, the output is written to this file instead of standard output (stdout). The output format is inferred from the file extension if not specified with --output-format (e.g., .xml for XML, .txt for plain text).
DESCRIPTION
lstopo-no-graphics is a specialized variant of the hwloc (Hardware Locality) project's primary tool, lstopo. Its main purpose is to display the underlying hardware topology of a system, including information about CPUs, caches, NUMA nodes, memory, and I/O devices.
Unlike the default lstopo, this version is specifically designed to operate without any graphical dependencies or output. It provides topology information exclusively in textual or XML formats, making it ideal for use in environments where a graphical display is unavailable or undesirable. This includes SSH sessions, headless servers, scripting, or automated system analysis.
The command helps users and applications understand the machine's architecture, which is crucial for optimizing software performance by making informed decisions about process and data placement.
CAVEATS
lstopo-no-graphics inherently cannot produce graphical output; it will always default to a text or XML representation. The accuracy and completeness of the topology information depend on the operating system's ability to expose hardware details. On complex systems, the textual output can be very large and require careful parsing. Some detailed hardware information might require root privileges to access. When reading from an input XML file, it assumes the input represents the topology as previously discovered, not the live system.
OUTPUT FORMATS
lstopo-no-graphics supports several non-graphical output formats:
- ascii: A detailed textual representation using ASCII characters for hierarchical structure.
- plain: A simpler, more compact textual output, often suitable for quick glances or parsing.
- curses: An interactive textual display (if a terminal supporting curses is detected), offering a more dynamic view.
- console: Similar to plain, designed for direct console output.
- xml: A structured XML format, ideal for programmatic parsing, saving, and later re-reading topology data.
USE CASES
This command is invaluable for:
- High-Performance Computing (HPC): Optimizing MPI process placement and OpenMP thread affinity on multi-core, multi-socket, and NUMA architectures.
- System Administration: Understanding system resource layout for troubleshooting performance issues or planning resource allocation.
- Scripting and Automation: Collecting hardware topology information programmatically for inventory, configuration, or performance monitoring scripts.
- Virtualization: Analyzing the physical topology of a host or the exposed topology within a virtual machine.
HISTORY
The hwloc (Hardware Locality) project was initiated around 2009 with the goal of providing a portable abstraction of hierarchical machine architectures. lstopo quickly became its flagship command-line tool. The lstopo-no-graphics variant emerged to specifically address environments lacking graphical capabilities, allowing the core functionality of topology discovery and display to be accessible everywhere, from supercomputers without X servers to simple SSH sessions. It represents a commitment to versatility and portability in hardware analysis tools.


