hwloc-ps (1) - Linux Manuals
hwloc-ps: List currently-running processes or threads that are bound
NAME
hwloc-ps - List currently-running processes or threads that are boundSYNOPSIS
hwloc-ps [options]OPTIONS
- -a
- list all processes, even those that are not bound to any specific part of the machine.
- -p --physical
- report OS/physical indexes instead of logical indexes
- -l --logical
- report logical indexes instead of physical/OS indexes (default)
- -c --cpuset
- show process bindings as cpusets instead of objects.
- -t --threads
- show threads inside processes. If -a is given as well, list all threads within each process. Otherwise, show all threads inside each process where at least one thread is bound.
- -e --get-last-cpu-location
- Report the last processors where the process/thread ran. Note that the result may already be outdated when reported since the operating system may move the tasks to other processors at any time according to the binding.
- --whole-system
- Do not consider administration limitations.
- --pid-cmd <cmd>
- Append the output of the given command to each PID line. For each displayed process ID, execute the command <cmd> <pid> and append the first line of its output to the regular hwloc-ps line.
DESCRIPTION
By default, hwloc-ps lists only those currently-running processes that are bound. If -t is given, processes that are not bound but contain at least one bound thread are also displayed, as well as all their threads.hwloc-ps displays process identifier, command-line and binding. The binding may be reported as objects or cpusets.
By default, process bindings are restricted to the currently available topology. If some processes are bound to processors that are not available to the current process, they are ignored unless --whole-system is given.
The output is a plain list. If you wish to annotate the hierarchical topology with processes so as to see how they are actual distributed on the machine, you might want to use lstopo --ps instead (which also only shows processes that are bound).
The -a switch can be used to show all processes, if desired.
EXAMPLES
If a process is bound, it appears in the default output:
If a process is not bound but 3 of his 4 threads are bound,
it only appears in the thread-aware output:
To display the binding of already running MPI processes (launched by
Open MPI) and append their MPI rank (in MPI_COMM_WORLD) to each line:
where myscript is a bash script doing: