[GH-ISSUE #33] [Question] nvitop runs non-dynamically inside slurm jobs #24

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

Originally created by @Saber813 on GitHub (Aug 15, 2022).
Original GitHub issue: https://github.com/XuehaiPan/nvitop/issues/33

Runtime Environment

  • Operating system and version: CentOS 7.4
  • Python version: 3.8.13
  • NVML version (driver version): 470.63
  • nvitop version or commit: 0.7.2
  • python-ml-py version: 11.450.51
  • Locale: zh_CN.UTF-8

Current Behavior

Query the GPU usage of the computing node through Slurm, and the output is displayed statically

Images / Videos

b1d1d04c16ca93fbd7d9fa39a2ac273
Originally created by @Saber813 on GitHub (Aug 15, 2022). Original GitHub issue: https://github.com/XuehaiPan/nvitop/issues/33 #### Runtime Environment - Operating system and version: CentOS 7.4 - Python version: 3.8.13 - NVML version (driver version): 470.63 - `nvitop` version or commit: 0.7.2 - `python-ml-py` version: 11.450.51 - Locale: zh_CN.UTF-8 #### Current Behavior Query the GPU usage of the computing node through Slurm, and the output is displayed **statically** #### Images / Videos <!-- Only if relevant --> <img width="281" alt="b1d1d04c16ca93fbd7d9fa39a2ac273" src="https://user-images.githubusercontent.com/34484194/184590745-871684a0-d004-49ac-aecf-89ffe7b9f4d0.png">
gitea-mirror 2026-05-05 03:22:20 -06:00
  • closed this issue
  • added the
    question
    label
Author
Owner

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

Hi @Saber813, this is intentional behavior. Your stdout is not a TTY terminal with slurm.

a2f7c2425c/nvitop/cli.py (L268-L270)

You should add --pty option to enable a pseudo-terminal:

image

<!-- gh-comment-id:1214698325 --> @XuehaiPan commented on GitHub (Aug 15, 2022): Hi @Saber813, this is intentional behavior. Your `stdout` is not a TTY terminal with `slurm`. https://github.com/XuehaiPan/nvitop/blob/a2f7c2425cf7f4edecbc1b701dd7ed979f5552fe/nvitop/cli.py#L268-L270 You should add `--pty` option to enable a pseudo-terminal: ![image](https://user-images.githubusercontent.com/16078332/184592620-ac110769-3695-4e6f-8f4a-5b55baa51de8.png)
Author
Owner

@Saber813 commented on GitHub (Aug 16, 2022):

It works! Thank you, Closed

<!-- gh-comment-id:1216302458 --> @Saber813 commented on GitHub (Aug 16, 2022): It works! Thank you, Closed
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#24
No description provided.