HWLOC-PS(1) hwloc HWLOC-PS(1) (NAME) hwloc-ps - (SYNOPSIS) hwloc-ps [] (OPTIONS) -a . --pid . --children-of-pid . --name . . --uid (UID) all. . Linux . -p --physical / . -l --logical / (). -c --cpuset cpuset . -t --threads . -a . . Linux . --single-ancestor ( ). -e --get-last-cpu-location / . . --disallowed . --pid-cmd PID. hwloc-ps . --pid-cmd env= Linux name . --pid-cmd mpirank Linux MPI ( ) . --lstopo-misc / Misc lstopo --misc-from . . --json-server JSON . contrib/hwloc-ps.www/ . --json-port 8888. -v --verbose JSON. --short-name . --version . -h --help . (DESCRIPTION) hwloc-ps . -t . hwloc-ps (binding) . cpusets . . --disallowed . . lstopo --ps ( ). -a . (EXAMPLES) : $ hwloc-ps 4759 Core:0 myprogram (package) . --single-ancestor ( Core:0 Package:0 ): $ hwloc-ps 4863 Core:1 Core:2 myprogram $ hwloc-ps --single-ancestor 4863 Package:0 myprogram ( ): $ hwloc-ps $ hwloc-ps -t 4759 Machine:0 myprogram 4759 Machine:0 4761 PU:0 4762 PU:2 4765 PU:1 $ hwloc-ps --pid 4759 4759 Machine:0 myprogram lstopo (Example with lstopo integration) lstopo Misc ( lstopo --top): $ hwloc-ps --misc-from foo $ cat foo name=12444 myprogram cpuset=0x000000f0 subtype=Process name=12444 mythread1 cpuset=0x00000050 subtype=Thread name=12444 mythread2 cpuset=0x000000a0 subtype=Thread lstopo : $ hwloc-ps --misc-from - | lstopo --misc-from - MPI (Examples with MPI processes) Linux hwloc-ps . MPI : $ hwloc-ps --pid-cmd env=OMPI_COMM_WORLD_RANK 29093 PU:0 myprogram OMPI_COMM_WORLD_RANK=0 29094 PU:2 myprogram OMPI_COMM_WORLD_RANK=1 29095 PU:1 myprogram OMPI_COMM_WORLD_RANK=2 29096 PU:3 myprogram OMPI_COMM_WORLD_RANK=3 MPI ( OMPI_COMM_WORLD_RANK PMIX_RANK PMI_RANK SLURM_PROCID) mpirank hwloc-ps : $ hwloc-ps --pid-cmd mpirank 29093 PU:0 myprogram PMIX_RANK=0 29094 PU:2 myprogram PMIX_RANK=1 29095 PU:1 myprogram PMIX_RANK=2 29096 PU:3 myprogram PMIX_RANK=3 hwloc-ps . Open MPI: $ hwloc-ps --pid-cmd myscript 29093 PU:0 myprogram OMPI_COMM_WORLD_RANK=0 29094 PU:2 myprogram OMPI_COMM_WORLD_RANK=1 29095 PU:1 myprogram OMPI_COMM_WORLD_RANK=2 29096 PU:3 myprogram OMPI_COMM_WORLD_RANK=3 myscript : #!/bin/sh cat /proc/$1/environ 2>/dev/null | xargs --null --max-args=1 echo | grep OMPI_COMM_WORLD_RANK (SEE ALSO) hwloc(7), lstopo(1), hwloc-calc(1), hwloc-distrib(1) hwloc- ps.www/README 2.14.0 June 8, 2026 HWLOC-PS(1)