mobile wallpaper 1mobile wallpaper 2mobile wallpaper 3mobile wallpaper 4mobile wallpaper 5mobile wallpaper 6
303 字
1 分钟
高级 GPU 资源监控 nvitop
2024-05-17
统计加载中...

高级 GPU 资源监控 nvitop#

介绍#

nvitop:交互式的 NVIDIA-GPU 监控。略多版介绍可见 上海交大超算平台用户手册-nvitop

部署#

请务必使用 root 权限进行全局安装,否则会被安装到 conda 隔离环境中。

sudo pip3 install --upgrade nvitop

参数列表#

[!tip] 只列出的部分常用参数,具体见官方文档,或者 nvitop --help

可选参数:
--help, -h 帮助文档
--version, -V 查看版本号
--once, -1 只显示一次信息
--monitor [{auto,full,compact}], -m [{auto,full,compact}]
持续监控,如果省略-m参数,默认采用auto
--interval SEC 进程状态更新间隔(单位: ) (默认: 2s)
颜色:
--colorful 使用渐变色显示条形图
--light 使用亮色主题显示(NVITOP_MONITOR_MODE="light")
设备过滤:
--only idx [idx ...], -o idx [idx ...]
只显示指定设备
--only-visible, -ov 只显示 `CUDA_VISIBLE_DEVICES` 环境变量对应的设备
进程过滤:
--compute, -c 显示具有计算上下文的GPU进程 (type: 'C' or 'C+G')
--only-compute, -C 显示只具有计算上下文的GPU进程 (type: 'C' only)
--graphics, -g 显示具有图形处理上下文的GPU进程 (type: 'G' or 'C+G')
--only-graphics, -G 显示只具有图形处理上下文的GPU进程 (type: 'G' only)
--user [USERNAME [USERNAME ...]], -u [USERNAME [USERNAME ...]]
显示指定用户的进程 (or `$USER` for no argument).
--pid PID [PID ...], -p PID [PID ...]
显示置顶PID的进程

快捷键#

默认情况下,调用 nvitop 会进入 monitor 模式,类似于 top,而 nvitop -1 才是与原版 nvidia-smi 类似的单次显示。

在 monitor 模式下,存在一些快捷键:

太多了,只摘取了一些常用的,懒得翻译了,就这样吧

KeyBinding
qQuit and return to the terminal.
h / ?Go to the help screen.
a / f / cChange the display mode to auto / full / compact.
r / <C-r> / <F5>Force refresh the window.
<Up> / <Down>Select and highlight a process.
<Left> / <Right>Scroll the host information of processes.
<Home>Select the first process.
<End>Select the last process.
<C-a>
^
Scroll left to the beginning of the process entry (i.e. beginning of line).
<C-e>
$
Scroll right to the end of the process entry (i.e. end of line).
<PageUp> / <PageDown>scroll entire screen (for large amounts of processes).
<Space>Tag/untag current process.
<Esc>Clear process selection.
<C-c>
I
Send signal.SIGINT to the selected process (interrupt).
TSend signal.SIGTERM to the selected process (terminate).
KSend signal.SIGKILL to the selected process (kill).
eShow process environment.
tToggle tree-view screen.
<Enter>Show process metrics.
, / .Select the sort column.
/Reverse the sort order.
分享

如果这篇文章对你有帮助,欢迎分享给更多人!

高级 GPU 资源监控 nvitop
https://blog.085404.xyz/posts/高级-gpu-资源监控-nvitop/
作者
Sun2ot
发布于
2024-05-17
许可协议
CC BY-NC-SA 4.0

部分信息可能已经过时

封面
Sample Song
Sample Artist
封面
Sample Song
Sample Artist
0:00 / 0:00