[GH-ISSUE #19] [Question] Which processes are using GPU memory? #16

Closed
opened 2026-05-05 03:22:05 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @jiapei-nexera on GitHub (Jun 14, 2022).
Original GitHub issue: https://github.com/XuehaiPan/nvitop/issues/19

What command(s) will be able to tell which process(es) are using GPU memory?

Runtime Environment

  • Operating system and version: Ubuntu 22.04 LTS
  • Terminal emulator and version: gnome-desktop3-data/jammy-updates,jammy-updates,now 42.1-0ubuntu1 all [installed]
  • Python version: 3.10.4
  • NVML version (driver version): 510.73.05
  • nvitop version or commit: nvitop 0.5.6
  • python-ml-py version: ??? what is that?
  • Locale: en_US.UTF-8

Current Behavior

working fine...

Expected Behavior

Looking forward to check which processes are using GPU memory ???

Context

N/A

Possible Solutions

N/A

Steps to Reproduce

Just run it...

nvitop

Traceback

Images / Videos

N/A

Originally created by @jiapei-nexera on GitHub (Jun 14, 2022). Original GitHub issue: https://github.com/XuehaiPan/nvitop/issues/19 What command(s) will be able to tell which process(es) are using GPU memory? #### Runtime Environment - Operating system and version: `Ubuntu 22.04 LTS` - Terminal emulator and version: `gnome-desktop3-data/jammy-updates,jammy-updates,now 42.1-0ubuntu1 all [installed]` - Python version: `3.10.4` - NVML version (driver version): `510.73.05` - `nvitop` version or commit: `nvitop 0.5.6` - `python-ml-py` version: **??? what is that?** - Locale: `en_US.UTF-8` #### Current Behavior working fine... #### Expected Behavior Looking forward to check which processes are using GPU memory ??? #### Context N/A #### Possible Solutions N/A #### Steps to Reproduce Just run it... ```console nvitop ``` #### Traceback #### Images / Videos <!-- Only if relevant --> N/A
gitea-mirror 2026-05-05 03:22:05 -06:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@XuehaiPan commented on GitHub (Jun 15, 2022):

Looking forward to check which processes are using GPU memory?

Hi @jiapei-nexera, I do not quite understand your question. Did you mean how to see the processes on nvitop's GUI? Or looking for a method for Python program integration?

In the terminal GUI, the processes using GPU are listed at the bottom and all of them are using GPU memory. The column GPU-MEM shows the GPU memory consumption and %SM means the utilization of SM units.

Screenshot1

if you press the t key:

Screenshot2

the device that the process running on is shown in the column DEVICE (Host for using CPU only).


For program integration, please see https://github.com/XuehaiPan/nvitop#process.

The following code retrieves all processes running on the GPU:

from nvitop import Device

all_devices = Device.all()
all_processes = []
for device in all_devices:
    all_processes.extend(device.processes().values())
<!-- gh-comment-id:1156050549 --> @XuehaiPan commented on GitHub (Jun 15, 2022): > Looking forward to check which processes are using GPU memory? Hi @jiapei-nexera, I do not quite understand your question. Did you mean how to see the processes on `nvitop`'s GUI? Or looking for a method for Python program integration? In the terminal GUI, the processes using GPU are listed at the bottom and all of them are using GPU memory. The column `GPU-MEM` shows the GPU memory consumption and `%SM` means the utilization of SM units. ![Screenshot1](https://user-images.githubusercontent.com/16078332/173758756-014fc410-527b-471f-83c1-8047b9dde0b9.png) if you press the <kbd>t</kbd> key: ![Screenshot2](https://user-images.githubusercontent.com/16078332/173759016-60d56a4f-30d0-4547-9335-51deded78588.png) the device that the process running on is shown in the column `DEVICE` (Host for using CPU only). ------ For program integration, please see https://github.com/XuehaiPan/nvitop#process. The following code retrieves all processes running on the GPU: ```python from nvitop import Device all_devices = Device.all() all_processes = [] for device in all_devices: all_processes.extend(device.processes().values()) ```
Author
Owner

@jiapei-nexera commented on GitHub (Jun 15, 2022):

@XuehaiPan

Great.... Got you ... Thank you....

<!-- gh-comment-id:1156706642 --> @jiapei-nexera commented on GitHub (Jun 15, 2022): @XuehaiPan Great.... Got you ... Thank you....
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/nvitop#16
No description provided.