PS

List status of processes currently using GPU resources.

Note

This command is supported on Linux only.

Synopsis

xpu-smi ps
xpu-smi ps -d [deviceId]
xpu-smi ps --device [deviceId]
xpu-smi ps --device [deviceId] -j

Output Columns

Column

Description

PID

Process ID

Command

Process command name

DeviceID

Device ID the process is using

SHR

Size of shared device memory mapped into the process, in kB (may not be available on all platforms)

MEM

Device memory allocated by this process, in kB (may not be available on all platforms)

Options

-h, --help

Print this help message and exit.

-j, --json

Print result in JSON format.

-d <deviceId>, --device <deviceId>, --id <deviceId>

The device ID or PCI BDF address. Accepts a comma-separated list to list processes from several devices at once (e.g., -d 0,1,4). If not specified, processes from all GPUs are listed.

Examples

List all processes using any GPU:

xpu-smi ps

List processes using device 0:

xpu-smi ps --device 0

List processes using device 0 in JSON format:

xpu-smi ps --device 0 -j