hwloc-ls.1 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885
  1. .\" -*- nroff -*-
  2. .\" Copyright © 2009-2023 Inria. All rights reserved.
  3. .\" Copyright © 2009-2010 Université of Bordeaux
  4. .\" Copyright © 2009-2010 Cisco Systems, Inc. All rights reserved.
  5. .\" Copyright © 2020 Hewlett Packard Enterprise. All rights reserved.
  6. .\" See COPYING in top-level directory.
  7. .TH LSTOPO "1" "Sep 07, 2023" "2.9.3" "hwloc"
  8. .SH NAME
  9. lstopo, lstopo-no-graphics, hwloc-ls \- Show the topology of the system
  10. .
  11. .\" **************************
  12. .\" Synopsis Section
  13. .\" **************************
  14. .SH SYNOPSIS
  15. .
  16. .B lstopo
  17. [ \fIoptions \fR]... [ \fIfilename \fR]
  18. .
  19. .PP
  20. .B lstopo-no-graphics
  21. [ \fIoptions \fR]... [ \fIfilename \fR]
  22. .
  23. .PP
  24. .B hwloc-ls
  25. [ \fIoptions \fR]... [ \fIfilename \fR]
  26. .
  27. .PP
  28. Note that hwloc(7) provides a detailed explanation of the hwloc system; it
  29. should be read before reading this man page
  30. .
  31. .\" **************************
  32. .\" Options Section
  33. .\" **************************
  34. .SH OPTIONS
  35. .
  36. .TP
  37. \fB\-\-of\fR <format>, \fB\-\-output\-format\fR <format>
  38. Enforce the output in the given format.
  39. See the OUTPUT FORMATS section below.
  40. .TP
  41. \fB\-i\fR <path>, \fB\-\-input\fR <path>
  42. Read the topology from <path> instead of discovering the topology of the local machine.
  43. If <path> is a file,
  44. it may be a XML file exported by a previous hwloc program.
  45. If <path> is "\-", the standard input may be used as a XML file.
  46. On Linux, <path> may be a directory containing the topology files
  47. gathered from another machine topology with hwloc-gather-topology.
  48. On x86, <path> may be a directory containing a cpuid dump gathered
  49. with hwloc-gather-cpuid.
  50. When the archivemount program is available, <path> may also be a tarball
  51. containing such Linux or x86 topology files.
  52. .TP
  53. \fB\-i\fR <specification>, \fB\-\-input\fR <specification>
  54. Simulate a fake hierarchy (instead of discovering the topology on the
  55. local machine). If <specification> is "node:2 pu:3", the topology will
  56. contain two NUMA nodes with 3 processing units in each of them.
  57. The <specification> string must end with a number of PUs.
  58. .TP
  59. \fB\-\-if\fR <format>, \fB\-\-input\-format\fR <format>
  60. Enforce the input in the given format, among \fBxml\fR, \fBfsroot\fR,
  61. \fBcpuid\fR and \fBsynthetic\fR.
  62. .TP
  63. \fB\-\-export\-xml\-flags\fR <flags>
  64. Enforce flags when exporting to the XML format.
  65. Flags may be given as numeric values or as a comma-separated list of flag names
  66. that are passed to \fIhwloc_topology_export_xml()\fR.
  67. Those names may be substrings of actual flag names as long as a single one matches.
  68. A value of \fB1\fR (or \fBv1\fR) reverts to the format of hwloc v1.x.
  69. The default is \fB0\fR (or \fBnone\fR).
  70. .TP
  71. \fB\-\-export\-synthetic\-flags\fR <flags>
  72. Enforce flags when exporting to the synthetic format.
  73. Flags may be given as numeric values or as a comma-separated list of flag names
  74. that are passed to \fIhwloc_topology_export_synthetic()\fR.
  75. Those names may be substrings of actual flag names as long as a single one matches.
  76. A value of \fB2\fR (or \fBno_attr\fR) reverts to the format of hwloc v1.9.
  77. A value of \fB3\fR (or \fBno_ext,no_attr\fR) reverts to the original minimalistic format (before v1.9).
  78. The default is \fB0\fR (or \fBnone\fR).
  79. .TP
  80. \fB\-v\fR \fB\-\-verbose\fR
  81. Include additional detail.
  82. The hwloc-info tool may be used to display even more information
  83. about specific objects.
  84. .TP
  85. \fB\-s\fR \fB\-\-silent\fR
  86. Reduce the amount of details to show.
  87. .TP
  88. \fB\-\-distances\fR
  89. Only display distance matrices.
  90. .TP
  91. \fB\-\-distances-transform\fR <links|merge-switch-ports|transitive-closure>
  92. Try applying a transformation to distances structures before displaying them.
  93. See hwloc_distances_transform() for details.
  94. More transformations may be applied using hwloc-annotate(1)
  95. (and it may save their output to XML).
  96. .TP
  97. \fB\-\-memattrs\fR
  98. Only display memory attributes.
  99. All of them are displayed (while the default textual output selects
  100. memory attribute details depending on the verbosity level).
  101. .TP
  102. \fB\-\-cpukinds\fR
  103. Only display CPU kinds.
  104. CPU kinds are displayed in order, starting from the most energy efficient
  105. ones up to the rather higher performance and power hungry ones.
  106. .TP
  107. \fB\-\-windows\-processor\-groups\fR
  108. On Windows, only show information about processor groups.
  109. All of them are displayed, while the default verbose output
  110. only shows them if there are more than one.
  111. .TP
  112. \fB\-f\fR \fB\-\-force\fR
  113. If the destination file already exists, overwrite it.
  114. .TP
  115. \fB\-l\fR \fB\-\-logical\fR
  116. Display hwloc logical indexes of all objects, with prefix "L#".
  117. .
  118. By default, both logical and physical/OS indexes are displayed for PUs and NUMA nodes,
  119. logical only for cores, dies and packages, and no index for other types.
  120. .TP
  121. \fB\-p\fR \fB\-\-physical\fR
  122. Display OS/physical indexes of all objects, with prefix "P#".
  123. .
  124. By default, both logical and physical/OS indexes are displayed for PUs and NUMA nodes,
  125. logical only for cores, dies and packages, and no index for other types.
  126. .TP
  127. \fB\-\-logical\-index\-prefix\fR <prefix>
  128. Replace " L#" with the given prefix for logical indexes.
  129. .TP
  130. \fB\-\-os\-index\-prefix\fR <prefix>
  131. Replace " P#" with the given prefix for physical/OS indexes.
  132. .TP
  133. \fB\-c\fR \fB\-\-cpuset\fR
  134. Display the cpuset of each object.
  135. .TP
  136. \fB\-C\fR \fB\-\-cpuset\-only\fR
  137. Only display the cpuset of each object; do not display anything else
  138. about the object.
  139. .TP
  140. \fB\-\-taskset\fR
  141. Show CPU set strings in the format recognized by the taskset command-line
  142. program instead of hwloc-specific CPU set string format.
  143. This option should be combined with \fB\-\-cpuset\fR or \fB\-\-cpuset\-only\fR,
  144. otherwise it will imply \fB\-\-cpuset\fR.
  145. .TP
  146. \fB\-\-only\fR <type>
  147. Only show objects of the given type in the textual output.
  148. .TP
  149. \fB\-\-filter\fR <type>:<kind>, \fB\-\-filter\fR <type>
  150. Filter objects of type <type>, or of any type if <type> is "all".
  151. "io", "cache" and "icache" are also supported.
  152. <kind> specifies the filtering behavior.
  153. If "none" or not specified, all objects of the given type are removed.
  154. If "all", all objects are kept as usual.
  155. If "structure", objects are kept when they bring structure to the topology.
  156. If "important" (only applicable to I/O), only important objects are kept.
  157. See hwloc_topology_set_type_filter() for more details.
  158. hwloc supports filtering any type except PUs and NUMA nodes.
  159. lstopo also offers PU and NUMA node filtering by hiding them in the graphical and textual outputs,
  160. but any object included in them (for instance Misc) will be hidden as well.
  161. Note that PUs and NUMA nodes may not be ignored in the XML output.
  162. Note also that the top-level object type cannot be ignored (usually Machine or System).
  163. .TP
  164. \fB\-\-ignore\fR <type>
  165. This is the old way to specify \fB-\-filter <type>:none\fR.
  166. .TP
  167. \fB\-\-no\-smt\fR
  168. Ignore PUs.
  169. This is identical to \fB-\-filter PU:none\fR.
  170. .TP
  171. \fB\-\-no\-caches\fR
  172. Do not show caches.
  173. This is identical to \fB-\-filter cache:none\fR.
  174. .TP
  175. \fB\-\-no\-useless\-caches\fR
  176. This is identical to \fB-\-filter cache:structure\fR.
  177. .TP
  178. \fB\-\-no\-icaches\fR
  179. This is identical to \fB-\-filter icache:none\fR.
  180. .TP
  181. \fB\-\-disallowed\fR
  182. Include objects disallowed by administrative limitations (e.g Cgroups on Linux).
  183. Offline PUs and NUMA nodes are still ignored.
  184. .TP
  185. \fB\-\-allow\fR <all|local|0xff|nodeset=0xf0>
  186. Include objects disallowed by administrative limitations (implies \fB\-\-disallowed\fR)
  187. and also change the set of allowed ones.
  188. If \fBlocal\fR is given, only objects available to the current process are allowed
  189. (default behavior when loading from the native operating system backend).
  190. It may be useful if the topology was created by another process (with different
  191. administrative restrictions such as Linux Cgroups) and loaded here loaded from XML
  192. or synthetic.
  193. This case implies \fB\-\-thissystem\fR.
  194. If \fBall\fR, all objects are allowed.
  195. If a bitmap is given as a hexadecimal string, it is used as the set of allowed PUs.
  196. If a bitmap is given after prefix \fBnodeset=\fR, it is the set of allowed NUMA nodes.
  197. .TP
  198. \fB\-\-flags\fR <flags>
  199. Enforce topology flags.
  200. Flags may be given as numeric values or as a comma-separated list of flag names
  201. that are passed to \fIhwloc_topology_set_flags()\fR.
  202. Those names may be substrings of actual flag names as long as a single one matches,
  203. for instance \fBdisallowed,thissystem_allowed\fR.
  204. The default is \fB8\fR (or \fBimport\fR).
  205. .TP
  206. \fB\-\-merge\fR
  207. Do not show levels that do not have a hierarchical impact.
  208. This sets HWLOC_TYPE_FILTER_KEEP_STRUCTURE for all object types.
  209. This is identical to \fB\-\-filter all:structure\fR.
  210. .TP
  211. \fB\-\-no\-factorize\fR \fB\-\-no\-factorize\fR=<type>
  212. Never factorize identical objects in the graphical output.
  213. If an object type is given, only factorizing of these objects is disabled.
  214. This only applies to normal CPU-side objects, it is independent from PCI collapsing.
  215. .TP
  216. \fB\-\-factorize\fR \fB\-\-factorize\fR=[<type>,]<N>[,<L>[,<F>]
  217. Factorize identical children in the graphical output (enabled by default).
  218. If <N> is specified (4 by default), factorizing only occurs when there are strictly
  219. more than N identical children.
  220. If <L> and <F> are specified, they set the numbers of first and last children to keep
  221. after factorizing.
  222. If an object type is given, only factorizing of these objects is configured.
  223. This only applies to normal CPU-side object, it is independent from PCI collapsing.
  224. .TP
  225. \fB\-\-no\-collapse\fR
  226. Do not collapse identical PCI devices.
  227. By default, identical sibling PCI devices (such as many virtual functions
  228. inside a single physical device) are collapsed.
  229. .TP
  230. \fB\-\-no\-cpukinds\fR
  231. Do not show different kinds of CPUs in the graphical output.
  232. By default, when supported, different types of lines, thickness
  233. and bold font may be used to display PU boxes of different kinds.
  234. .TP
  235. \fB\-\-restrict\fR <cpuset>
  236. Restrict the topology to the given cpuset.
  237. This removes some PUs and their now-child-less parents.
  238. Beware that restricting the PUs in a topology may change the
  239. logical indexes of many objects, including NUMA nodes.
  240. .TP
  241. \fB\-\-restrict\fR nodeset=<nodeset>
  242. Restrict the topology to the given nodeset.
  243. (unless \fB\-\-restrict\-flags\fR specifies something different).
  244. This removes some NUMA nodes and their now-child-less parents.
  245. Beware that restricting the NUMA nodes in a topology may change the
  246. logical indexes of many objects, including PUs.
  247. .TP
  248. \fB\-\-restrict\fR binding
  249. Restrict the topology to the current process binding.
  250. This option requires the use of the actual current machine topology
  251. (or any other topology with \fB\-\-thissystem\fR or with
  252. HWLOC_THISSYSTEM set to 1 in the environment).
  253. Beware that restricting the topology may change the
  254. logical indexes of many objects, including PUs and NUMA nodes.
  255. .TP
  256. \fB\-\-restrict\-flags\fR <flags>
  257. Enforce flags when restricting the topology.
  258. Flags may be given as numeric values or as a comma-separated list of flag names
  259. that are passed to \fIhwloc_topology_restrict()\fR.
  260. Those names may be substrings of actual flag names as long as a single one matches,
  261. for instance \fBbynodeset,memless\fR.
  262. The default is \fB0\fR (or \fBnone\fR).
  263. .TP
  264. \fB\-\-no\-io\fB
  265. Do not show any I/O device or bridge.
  266. This is identical to \fB\-\-filter io:none\fR.
  267. By default, common devices (GPUs, NICs, block devices, ...) and
  268. interesting bridges/switches are shown.
  269. .TP
  270. \fB\-\-no\-bridges\fB
  271. Do not show any I/O bridge except hostbridges.
  272. This is identical to \fB\-\-filter bridge:none\fR.
  273. By default, common devices (GPUs, NICs, block devices, ...) and
  274. interesting bridges/switches are shown.
  275. .TP
  276. \fB\-\-whole\-io\fB
  277. Show all I/O devices and bridges.
  278. This is identical to \fB\-\-filter io:all\fR.
  279. By default, only common devices (GPUs, NICs, block devices, ...) and
  280. interesting bridges/switches are shown.
  281. .TP
  282. \fB\-\-thissystem\fR
  283. Assume that the selected backend provides the topology for the
  284. system on which we are running.
  285. This is useful when loading a custom topology such as an XML file
  286. and using \fB\-\-restrict binding\fR or \fB\-\-allow all\fR.
  287. .TP
  288. \fB\-\-pid\fR <pid>
  289. Detect topology as seen by process <pid>, i.e. as if process <pid> did the
  290. discovery itself.
  291. Note that this can for instance change the set of allowed processors.
  292. Also show this process current CPU and Memory binding by marking the corresponding
  293. PUs and NUMA nodes (in Green in the graphical output, see the COLORS section below,
  294. or by appending \fI(binding)\fR to the verbose text output).
  295. If 0 is given as pid, the current binding for the lstopo process will be shown.
  296. .TP
  297. \fB\-\-ps\fR \fB\-\-top\fR
  298. Show existing processes as misc objects in the output. To avoid uselessly
  299. cluttering the output, only processes that are restricted to some part of the
  300. machine are shown. On Linux, kernel threads are not shown.
  301. If many processes appear, the output may become hard to read anyway,
  302. making the hwloc-ps program more practical.
  303. .TP
  304. \fB\-\-children\-order\fR <order>
  305. Change the order of the different kinds of children with respect to
  306. their parent in the graphical output.
  307. \fI<order>\fR may be a comma-separated list of keywords among:
  308. \fImemory:above\fR displays memory children above other children
  309. (and above the parent if it is a cache).
  310. PUs are therefore below their local NUMA nodes, like hwloc 1.x did.
  311. \fIio:right\fR and \fImisc:right\fR place I/O or Misc children
  312. on the right of CPU children.
  313. \fIio:below\fR and \fImisc:below\fR place I/O or Misc children
  314. below CPU children.
  315. \fIplain\fR places everything not specified together with
  316. normal CPU children.
  317. If only \fIplain\fR is specified, lstopo displays the topology
  318. in a basic manner that strictly matches the actual tree:
  319. Memory, I/O and Misc children are listed below their parent just like any other child.
  320. PUs are therefore on the side of their local NUMA nodes,
  321. below a common ancestor.
  322. This output may result in strange layouts since the size of Memory,
  323. CPU and I/O children may be very different, causing the placement
  324. algorithm to poorly arrange them in rows.
  325. The default order is \fImemory:above,io:right,misc:right\fR which means
  326. Memory children are above CPU children while I/O and Misc are together
  327. on the right.
  328. Up to hwloc 2.5, the default was rather to \fImemory:above,plain\fR.
  329. Additionally, \fIio:right\fR, \fIio:below\fR, \fImisc:right\fR
  330. and \fImisc:below\fR may be suffixed with
  331. \fI:horiz\fR, \fI:vert\fR or \fI:rect\fR to force the horizontal,
  332. vertical or rectangular layout of children inside these sections.
  333. See also the GRAPHICAL OUTPUT and LAYOUT sections below.
  334. .TP
  335. \fB\-\-fontsize\fR <size>
  336. Set the size of text font in the graphical output.
  337. The default is 10.
  338. Boxes are scaled according to the text size.
  339. The \fILSTOPO_TEXT_XSCALE\fR environment variable may be used
  340. to further scale the width of boxes (its default value is 1.0).
  341. The \fB\-\-fontsize\fR option is ignored in the ASCII backend.
  342. .TP
  343. \fB\-\-gridsize\fR <size>
  344. Set the margin between elements in the graphical output.
  345. The default is 7. It was 10 prior to hwloc 2.1.
  346. This option is ignored in the ASCII backend.
  347. .TP
  348. \fB\-\-linespacing\fR <size>
  349. Set the spacing between lines of text in the graphical output.
  350. The default is 4.
  351. The option was included in \fB\-\-gridsize\fR prior to hwloc 2.1 (and its default was 10).
  352. This option is ignored in the ASCII backend.
  353. .TP
  354. \fB\-\-thickness\fR <size>
  355. Set the thickness of lines and boxes in the graphical output.
  356. The default is 1.
  357. This option is ignored in the ASCII backend.
  358. .TP
  359. \fB\-\-horiz\fR, \fB\-\-horiz\fR=<type1,...>
  360. Force a horizontal graphical layout instead of nearly 4/3 ratio in the graphical output.
  361. If a comma-separated list of object types is given, the layout only
  362. applies to the corresponding \fIcontainer\fR objects.
  363. Ignored for bridges since their children are always vertically aligned.
  364. .TP
  365. \fB\-\-vert\fR, \fB\-\-vert\fR=<type1,...>
  366. Force a vertical graphical layout instead of nearly 4/3 ratio in the graphical output.
  367. If a comma-separated list of object types is given, the layout only
  368. applies to the corresponding \fIcontainer\fR objects.
  369. .TP
  370. \fB\-\-rect\fR, \fB\-\-rect\fR=<type1,...>
  371. Force a rectangular graphical layout with nearly 4/3 ratio in the graphical output.
  372. If a comma-separated list of object types is given, the layout only
  373. applies to the corresponding \fIcontainer\fR objects.
  374. Ignored for bridges since their children are always vertically aligned.
  375. .TP
  376. \fB\-\-no\-text\fR, \fB\-\-no\-text\fR=<type1,...>
  377. Do not display any text in boxes in the graphical output.
  378. If a comma-separated list of object types is given, text is disabled for the corresponding objects.
  379. This is mostly useful for removing text from Group objects.
  380. .TP
  381. \fB\-\-text\fR, \fB\-\-text\fR=<type1,...>
  382. Display text in boxes in the graphical output (default).
  383. If a comma-separated list of object types is given, text is reenabled for the corresponding objects
  384. (if it was previously disabled with \fB\-\-no\-text\fR).
  385. .TP
  386. \fB\-\-no\-index\fR, \fB\-\-no\-index\fR=<type1,...>
  387. Do not show object indexes in the graphical output.
  388. If a comma-separated list of object types is given, indexes are disabled for the corresponding objects.
  389. .TP
  390. \fB\-\-index\fR, \fB\-\-index=\fR<type1,...>
  391. Show object indexes in the graphical output (default).
  392. If a comma-separated list of object types is given, indexes are reenabled for the corresponding objects
  393. (if they were previously disabled with \fB\-\-no\-index\fR).
  394. .TP
  395. \fB\-\-no\-attrs\fR, \fB\-\-no\-attrs\fR=<type1,...>
  396. Do not show object attributes (such as memory size, cache size, PCI bus ID, PCI link speed, etc.)
  397. in the graphical output.
  398. If a comma-separated list of object types is given, attributes are disabled for the corresponding objects.
  399. .TP
  400. \fB\-\-attrs\fR, \fB\-\-attrs=\fR<type1,...>
  401. Show object attributes (such as memory size, cache size, PCI bus ID, PCI link speed, etc.)
  402. in the graphical output (default).
  403. If a comma-separated list of object types is given, attributes are reenabled for the corresponding objects
  404. (if they were previously disabled with \fB\-\-no\-attrs\fR).
  405. .TP
  406. \fB\-\-no\-legend\fR
  407. Remove all text legend lines at the bottom of the graphical output.
  408. .TP
  409. \fB\-\-no\-default\-legend\fR
  410. Remove default text legend lines at the bottom of the graphical output.
  411. User-added legend lines with \fB\-\-append\-legend\fB or the "lstopoLegend" info
  412. are still displayed if any.
  413. .TP
  414. \fB\-\-append\-legend\fR <line>
  415. Append the line of text to the bottom of the legend in the graphical output.
  416. If adding multiple lines, each line should be given separately by
  417. passing this option multiple times.
  418. Additional legend lines may also be specified inside the topology using the
  419. "lstopoLegend" info attributes on the topology root object.
  420. .TP
  421. \fB\-\-grey\fR, \fB\-\-greyscale\fR
  422. Use greyscale instead of colors in the graphical output.
  423. .TP
  424. \fB\-\-palette\fR <grey|greyscale|defaut|colors|white|none>
  425. Change the color palette.
  426. Passing \fIgrey\fR or \fIgreyscale\fR is identical to passing \fB\-\-grey\fR or \fB\-\-greyscale\fR.
  427. Passing \fIwhite\fR or \fInone\fR uses white instead of colors for all box backgrounds.
  428. Passing \fIdefault\fR or \fIcolors\fR reverts back to the default color palette.
  429. .TP
  430. \fB\-\-palette\fR type=#rrggbb
  431. Replace the color of the given box type with the given 3x8bit hexadecimal RGB combination (e.g. \fI#ff0000\fR is red).
  432. Existing types are \fImachine\fR, \fIgroup\fR, \fIpackage\fR, \fIgroup_in_package\fR, \fIdie\fR, \fIcore\fR, \fIpu\fR, \fInumanode\fR, \fImemories\fR (box containing multiple memory children), \fIcache\fR, \fIpcidev\fR, \fIosdev\fR, \fIbridge\fR, and \fImisc\fR.
  433. See also CUSTOM COLOR below for customizing individual objects.
  434. .TP
  435. \fB\-\-binding\-color\fR <none|#rrggbb>
  436. Do not colorize PUs and NUMA nodes according to the binding in the graphical output.
  437. Or change the color to the given 3x8bit hexadecimal RGB combination (e.g. \fI#ff0000\fR is red).
  438. .TP
  439. \fB\-\-disallowed\-color\fR <none|#rrggbb>
  440. Do not colorize disallowed PUs and NUMA nodes in the graphical output.
  441. Or change the color to the given 3x8bit hexadecimal RGB combination (e.g. \fI#00ff00\fR is green).
  442. .TP
  443. \fB\-\-top\-color\fR <none|#rrggbb>
  444. Do not colorize task objects in the graphical output when \-\-top is given.
  445. Or change the color to the given 3x8bit hexadecimal RGB combination (e.g. \fI#0000ff\fR is blue).
  446. .TP
  447. \fB\-\-version\fR
  448. Report version and exit.
  449. .TP
  450. \fB\-h\fR \fB\-\-help\fR
  451. Display help message and exit.
  452. .
  453. .\" --shmem-output-addr is undocumented on purpose
  454. .
  455. .\" **************************
  456. .\" Description Section
  457. .\" **************************
  458. .SH DESCRIPTION
  459. .
  460. lstopo and lstopo-no-graphics are capable of displaying a topological map of
  461. the system in a variety of different output formats. The only difference
  462. between lstopo and lstopo-no-graphics is that graphical outputs are only
  463. supported by lstopo, to reduce dependencies on external libraries.
  464. hwloc-ls is identical to lstopo-no-graphics.
  465. .
  466. .PP
  467. The filename specified directly implies the output format that will be
  468. used; see the OUTPUT FORMATS section, below. Output formats that
  469. support color will indicate specific characteristics about individual
  470. CPUs by their color; see the COLORS section, below.
  471. .
  472. .\" **************************
  473. .\" Output Formats Section
  474. .\" **************************
  475. .SH OUTPUT FORMATS
  476. .
  477. .PP
  478. By default, if no output filename is specified, the output is sent
  479. to a graphical window if possible in the current environment
  480. (DISPLAY environment variable set on Unix, etc.).
  481. Otherwise, a text summary is displayed in the console.
  482. The console is also used when the program runs from a terminal
  483. and the output is redirected to a pipe or file.
  484. These default behaviors may be changed by passing \fB\-\-of console\fR
  485. to force console mode or \fB\-\-of window\fR for graphical window.
  486. .
  487. .PP
  488. The filename on the command line usually determines the format of the output.
  489. There are a few filenames that indicate specific output formats and
  490. devices (e.g., a filename of "-" will output a text summary to
  491. stdout), but most filenames indicate the desired output format by
  492. their suffix (e.g., "topo.png" will output a PNG-format file).
  493. .PP
  494. The format of the output may also be changed with "\-\-of".
  495. For instance, "\-\-of pdf" will generate a PDF-format file on the standard
  496. output, while "\-\-of fig toto" will output a Xfig-format file named "toto".
  497. .
  498. .PP
  499. The list of currently supported formats is given below. Any of them may
  500. be used with "\-\-of" or as a filename suffix.
  501. .TP
  502. .B default
  503. Send the output to a window or to the console depending on the environment.
  504. .
  505. .TP
  506. .B window
  507. Send the output to a graphical window.
  508. .
  509. .TP
  510. .B console
  511. Send a text summary to stdout.
  512. Binding or unallowed processors are only annotated in this mode
  513. if verbose; see the COLORS section, below.
  514. .
  515. .TP
  516. .B ascii
  517. Output an ASCII art representation of the map
  518. (formerly called \fBtxt\fR).
  519. If outputting to stdout and if colors are supported on the terminal,
  520. the output will be colorized.
  521. .
  522. .TP
  523. \fBtikz\fR or \fBtex\fR
  524. Output a LaTeX tikzpicture representation of the map that can be
  525. compiled with a LaTeX compiler.
  526. .
  527. .TP
  528. .B fig
  529. Output a representation of the map that can be loaded in Xfig.
  530. .
  531. .TP
  532. .B svg
  533. Output a SVG representation of the map,
  534. using Cairo (by default, if supported)
  535. or a native SVG backend (fallback, always supported).
  536. See \fBcairosvg\fR and \fBnativesvg\fR below.
  537. .
  538. .TP
  539. \fBcairosvg\fR or \fBsvg(cairo)\fR
  540. If lstopo was compiled with the proper support,
  541. output a SVG representation of the map using Cairo.
  542. .
  543. .TP
  544. \fBnativesvg\fR or \fBsvg(native)\fR
  545. Output a SVG representation of the map using the native SVG backend.
  546. It may be less pretty than the Cairo output, but it is always supported,
  547. and SVG objects have attributes for identifying and manipulating them.
  548. See dynamic_SVG_example.html for an example.
  549. .
  550. .TP
  551. .B pdf
  552. If lstopo was compiled with the proper
  553. support, lstopo outputs a PDF representation of the map.
  554. .
  555. .TP
  556. .B ps
  557. If lstopo was compiled with the proper
  558. support, lstopo outputs a Postscript representation of the map.
  559. .
  560. .TP
  561. .B png
  562. If lstopo was compiled with the proper
  563. support, lstopo outputs a PNG representation of the map.
  564. .
  565. .TP
  566. .B synthetic
  567. If the topology is symmetric
  568. (which requires that the root object has its symmetric_subtree field set),
  569. lstopo outputs a synthetic description string.
  570. This output may be reused as an input synthetic topology
  571. description later.
  572. See also the Synthetic topologies section in the documentation.
  573. Note that Misc and I/O devices are ignored during this export.
  574. .
  575. .TP
  576. .B xml
  577. lstopo outputs an XML representation of the map.
  578. It may be reused later, even on another machine, with lstopo \-\-input,
  579. the HWLOC_XMLFILE environment variable, or the hwloc_topology_set_xml()
  580. function.
  581. .PP
  582. The following special names may be used:
  583. .TP
  584. .B \-
  585. Send a text summary to stdout.
  586. .
  587. .TP
  588. .B /dev/stdout
  589. Send a text summary to stdout. It is effectively the same as
  590. specifying "\-".
  591. .
  592. .TP
  593. .B \-.<format>
  594. If the entire filename is "\-.<format>", lstopo behaves as if
  595. "\-\-of <format> -" was given, which means a file of the given format
  596. is sent to the standard output.
  597. .PP
  598. See the output of "lstopo \-\-help" for a specific list of what
  599. graphical output formats are supported in your hwloc installation.
  600. .
  601. .\" **************************
  602. .\" Graphical Section
  603. .\" **************************
  604. .
  605. .SH GRAPHICAL OUTPUT
  606. The graphical output is made of nested boxes representing
  607. the inclusion of objects in the hierarchy of resources.
  608. Usually a Machine box contains one or several Package boxes,
  609. that contain multiple Core boxes, with one or several PUs each.
  610. .SS Caches
  611. Caches are displayed in a slightly different manner because
  612. they do not actually include computing resources such as cores.
  613. For instance, a L2 Cache shared by a pair of Cores is drawn
  614. as a Cache box on top of two Core boxes
  615. (instead of having Core boxes inside the Cache box).
  616. .SS NUMA nodes and Memory-side Caches
  617. By default, NUMA nodes boxes are drawn on top of their local
  618. computing resources.
  619. For instance, a processor Package containing one NUMA node
  620. and four Cores is displayed as a Package box containing
  621. the NUMA node box above four Core boxes.
  622. If a NUMA node is local to the L3 Cache, the NUMA node is displayed
  623. above that Cache box.
  624. All this specific drawing strategy for memory objects may be disabled
  625. by passing command-line option \fB\-\-children\-order plain\fR.
  626. If multiple NUMA nodes are attached to the same parent object,
  627. they are displayed inside an additional unnamed memory box.
  628. If some Memory-side Caches exist in front of some NUMA nodes,
  629. they are drawn as boxes immediately above them.
  630. .SS PCI bridges, PCI devices and OS devices
  631. The PCI hierarchy is not drawn as a set of included boxes but rather
  632. as a tree of bridges (that may actually be switches) with links between them.
  633. The tree starts with a small square on the left for the
  634. hostbridge or root complex.
  635. It ends with PCI device boxes on the right.
  636. Intermediate PCI bridges/switches may appear as additional small
  637. squares in the middle.
  638. PCI devices on the right of the tree are boxes containing
  639. their PCI bus ID (such as 00:02.3).
  640. They may also contain sub-boxes for OS device objects
  641. such as a network interface \fIeth0\fR or a CUDA GPU \fIcuda0\fR.
  642. When there is a single link (horizontal line) on the right of a
  643. PCI bridge, it means that a single device or bridge is connected
  644. on the secondary PCI bus behind that bridge.
  645. When there is a vertical line, it means that multiple devices
  646. and/or bridges are connected to the same secondary PCI bus.
  647. The datarate of a PCI link may be written (in GB/s) right below
  648. its drawn line (if the operating system and/or libraries are able
  649. to report that information).
  650. This datarate is the currently configured speed of the entire PCI link
  651. (sum of the bandwidth of all PCI lanes in that link).
  652. It may change during execution since some devices are able to
  653. slow their PCI links down when idle.
  654. .
  655. .\" **************************
  656. .\" Layout Section
  657. .\" **************************
  658. .SH LAYOUT
  659. In its graphical output, lstopo uses simple rectangular heuristics
  660. to try to achieve a 4/3 ratio between width and height.
  661. Although the hierarchy of resources is properly reflected,
  662. the exact physical organization (NUMA distances, rings,
  663. complete graphs, etc.) is currently ignored.
  664. The layout of a level may be changed with \fB\-\-vert\fR, \fB\-\-horiz\fR,
  665. and \fB\-\-rect\fR to force a parent object to arrange its children
  666. in vertical, horizontal or rectangular manners respectively.
  667. The position of Memory, I/O and Misc children with respect to other
  668. children objects may be changed using \fB\-\-children\-order\fR.
  669. This effectivement divides children into multiple sections.
  670. The layout of children is first computed inside each section,
  671. before sections are placed inside (or below) the parent box.
  672. The vertical/horizontal/rectangular layout of these additional
  673. sections may also be configured through \fB\-\-children\-order\fR.
  674. .
  675. .\" **************************
  676. .\" Colors Section
  677. .\" **************************
  678. .SH COLORS
  679. Individual CPUs and NUMA nodes are colored in the graphical output
  680. formats to indicate different characteristics:
  681. .TP
  682. Green
  683. The topology is reported as seen by a specific process (see \fB\-\-pid\fR),
  684. and the given CPU or NUMA node is in this process CPU or Memory binding mask.
  685. .TP
  686. White
  687. The CPU or NUMA node is in the allowed set (see below).
  688. If the topology is reported as seen by a specific process (see \fB\-\-pid\fR),
  689. the object is also not in this process binding mask.
  690. .TP
  691. Red
  692. The CPU or NUMA node is not in the allowed set (see below).
  693. .
  694. .PP
  695. The "allowed set" is the set of CPUs or NUMA nodes to which the current process is
  696. allowed to bind. The allowed set is usually either inherited from the
  697. parent process or set by administrative qpolicies on the system. Linux
  698. cpusets are one example of limiting the allowed set for a process and
  699. its children to be less than the full set of CPUs or NUMA nodes on the system.
  700. .PP
  701. Different processes may therefore have different CPUs or NUMA nodes in the allowed
  702. set. Hence, invoking lstopo in different contexts and/or as different
  703. users may display different colors for the same individual CPUs (e.g.,
  704. running lstopo in one context may show a specific CPU as red, but
  705. running lstopo in a different context may show the same CPU as white).
  706. .PP
  707. Some lstopo output modes, e.g. the console mode (default non-graphical output),
  708. do not support colors at all.
  709. The console mode displays the above characteristics by appending text
  710. to each PU line if verbose messages are enabled.
  711. .
  712. .SH CUSTOM COLORS
  713. The colors of different kinds of boxes may be configured with \fB\-\-palette\fR.
  714. The color of each object in the graphical output may also be enforced by
  715. specifying a "lstopoStyle" info attribute in that object.
  716. Its value should be a semi-colon separated list of "<attribute>=#rrggbb"
  717. where rr, gg and bb are the RGB components of a color,
  718. each between 0 and 255, in hexadecimal (00 to ff).
  719. .
  720. <attribute> may be
  721. .TP
  722. \fBBackground\fR
  723. Sets the background color of the main object box.
  724. .TP
  725. \fBText\fR
  726. Sets the color of the text showing the object name, type, index, etc.
  727. .TP
  728. \fBText2\fB
  729. Sets the color of the additional text near the object,
  730. for instance the link speed behind a PCI bridge.
  731. .PP
  732. The "lstopoStyle" info may be added to a temporarily-saved XML topologies
  733. with hwloc-annotate, or with hwloc_obj_add_info().
  734. .
  735. For instance, to display all core objects in blue (with white names):
  736. lstopo save.xml
  737. hwloc-annotate save.xml save.xml core:all info lstopoStyle "Background=#0000ff;Text=#ffffff"
  738. lstopo -i save.xml
  739. .
  740. .\" **************************
  741. .\" Examples Section
  742. .\" **************************
  743. .SH EXAMPLES
  744. .
  745. To display the machine topology in textual mode:
  746. lstopo-no-graphics
  747. To display the machine topology in ascii-art mode:
  748. lstopo-no-graphics -.ascii
  749. To display in graphical mode (assuming that the DISPLAY environment
  750. variable is set to a relevant value):
  751. lstopo
  752. To export the topology to a PNG file:
  753. lstopo file.png
  754. To export an XML file on a machine and later display the corresponding
  755. graphical output on another machine:
  756. machine1$ lstopo file.xml
  757. <transfer file.xml from machine1 to machine2>
  758. machine2$ lstopo --input file.xml
  759. To save the current machine topology to XML and later reload it faster
  760. while still considering it as the current machine:
  761. $ lstopo file.xml
  762. <...>
  763. $ lstopo --input file.xml --thissystem
  764. To restrict an XML topology to only physical processors 0, 1, 4 and 5:
  765. lstopo --input file.xml --restrict 0x33 newfile.xml
  766. To restrict an XML topology to only numa node whose logical index is 1:
  767. lstopo --input file.xml --restrict $(hwloc-calc --input file.xml node:1) newfile.xml
  768. To display a summary of the topology:
  769. lstopo -s
  770. To get more details about the topology:
  771. lstopo -v
  772. To only show cores:
  773. lstopo --only core
  774. To show cpusets:
  775. lstopo --cpuset
  776. To only show the cpusets of package:
  777. lstopo --only package --cpuset-only
  778. Simulate a fake hierarchy; this example shows with 2 NUMA nodes of 2
  779. processor units:
  780. lstopo --input "node:2 2"
  781. To count the number of logical processors in the system
  782. lstopo --only pu | wc -l
  783. To append the kernel release and version to the graphical legend:
  784. lstopo --append-legend "Kernel release: $(uname -r)" --append-legend "Kernel version: $(uname -v)"
  785. .
  786. .\" **************************
  787. .\" Notes Section
  788. .\" **************************
  789. .SH NOTES
  790. .
  791. lstopo displays memory and cache sizes with units such as
  792. \fBkB\fR (1 kilobyte = 1000 bytes) or \fBGB\fR (1 gigabyte = 1000*1000*1000 bytes)
  793. while it actually means
  794. \fBKiB\fR (1 kibibyte = 1024 bytes) or \fBGiB\fR (1 gibibytes = 1024*1024*1024 bytes) .
  795. .
  796. .\" **************************
  797. .\" See also section
  798. .\" **************************
  799. .SH SEE ALSO
  800. .
  801. .ft R
  802. hwloc(7), hwloc-info(1), hwloc-bind(1), hwloc-annotate(1), hwloc-ps(1), hwloc-gather-topology(1), hwloc-gather-cpuid(1)
  803. .sp