【提升服务器使用幸福感的必备小工具(一)】gpustat和tmux

查看GPU使用情况(使用人):

本期小工具1:gpustat

安装方式:

pip install gpustat

常用指令:

watch -n 2 --color gpustat --c        

可以实时查看所有GPU的配置及当前使用情况(含使用人),退出指令为ctrl+c

指令执行情况展示:
【提升服务器使用幸福感的必备小工具(一)】gpustat和tmux_第1张图片
下述语句也可达到相同效果,更便捷,推荐

gpustat -i

终端复用(退出终端不中断程序执行):

本期小工具2:tmux

更全指令链接:https://zhuanlan.zhihu.com/p/102546608

常用指令:

tmux new -s test                 #创建名为test的会话(session)
ctrl+b d                         #退出tmux会话(ctrl+b后 松手 再d)
tmux a -t test                   #再次进入test
tmux ls                          #查看已有的tmux会话列表
tmux kill-session -t test        #杀死名为test的会话

注:根据尝试,不可以把已经在终端运行的训练转移到tmux会话中。

你可能感兴趣的:(linux)