plgrp - Man Page

display current NUMA node and thread CPU affinities

Synopsis

plgrp [-a node_list] [pid[/tid] | core] ...

Description

Display the current NUMA node for each thread in the specified processes or process core files. The node is the NUMA node of the CPU on which the thread is currently (or was last) running. With the -a option, also display whether each thread's CPU affinity mask covers all, some, or none of the CPUs on the requested nodes. For core files, the NODE column shows ? because the running CPU is not captured by systemd-coredump(8), and CPU affinity is derived from Cpus_allowed_list in the saved process status.

Options

-a node_list

Display affinity information for the specified NUMA nodes. The node_list is a comma-separated list of node IDs, ranges (e.g. 0-3), or the keywords all or leaves (all online nodes). Nodes are grouped by affinity: all means the thread's CPU affinity mask includes every CPU on that node, some means it includes some but not all, and none means it includes no CPUs on that node.

Operands

pid[/tid]

Process ID, optionally followed by a slash and a thread ID to display a single thread. A /proc/pid path may also be used, allowing shell expansions like /proc/* to target all processes on the system.

core

Process core file, as produced by systemd-coredump(8). The core file does not need to exist on disk; if it has been removed, the corresponding systemd journal entry will be used instead. See Notes below.

Examples

Example 1 Display current nodes Display the current NUMA node for each thread of the shell:

  $ plgrp $$
         PID/TID  NODE
       3401/3401     1

Example 2 Display affinities Display current node and affinity for nodes 0 through 2:

  $ plgrp -a 0-2 101398
         PID/TID  NODE  AFFINITY
   101398/101398     1  0,2/all,1/none
   101398/101412     0  0,2/all,1/none

Exit Status

0 on success, non-zero if an error occurs (such as no such process, permission denied, or invalid option).

Files

/proc/pid/task/tid/stat

Thread scheduling information.

/sys/devices/system/node/

NUMA topology information.

Notes

When a core file has been removed by systemd-tmpfiles(8) or by storage limits configured in coredump.conf(5), the systemd-coredump(8) journal entry for the crash may still be available. In this case, the path to the deleted core file can be passed as the core operand even though the file no longer exists on disk, and process metadata will be retrieved from the journal entry instead. Use coredumpctl(1) to obtain the path of a missing core file, e.g., coredumpctl list <name> -F COREDUMP_FILENAME.

Ubuntu/Debian apport .crash files are also supported. These files use Debian control syntax with base64-encoded gzip core dumps. Text fields (such as ProcCmdline, ProcEnviron, and ExecutablePath) are mapped to COREDUMP_* fields, and the core dump is extracted on first access.

Warnings

For core files, the NODE column always shows ? because systemd-coredump(8) does not capture which CPU each thread was running on at the time of the crash. Only the main thread is available from core files; information for other threads is not displayed.

See Also

taskset(1), numactl(8), coredumpctl(1), sched_getaffinity(2), proc(5)

Info

March 2026 plgrp 0.2.22