多服务器gpu监控工具
ksmi的Python项目详细描述
凯罗斯SMI
多服务器GPU监控程序
请参阅更改日志:change log
usage: ksmi [-h] [-l] [-c CONFIG]
optional arguments:
-h, --help show this help message and exit
-l, --loop loop forever
-c CONFIG, --config CONFIG
set config file location
快速启动
一。安装
使用pip安装
$ pip install ksmi or $ pip3 install ksmi
2.设置配置文件
编辑config.json
。在config.json
中添加GPU服务器地址。
{"hosts":["<username>@<host>[:port]","<username>@<host>[:port]"]}
三。将rsa\u id添加到服务器
创建新的rea_id并添加到您的服务器
$ python3 -m ksmi.copy_id -c config.json -n
四。快跑!
$ python3 -m ksmi -c config.json -l
凯罗斯SMI
usage: kairos_smi.py [-h] [-l] [-c CONFIG]
optional arguments:
-h, --help show this help message and exit
-l, --loop loop forever
-c CONFIG, --config CONFIG
set config file location
简单用法
运行一次
$ python3 -m ksmi -c config.json
永远运行
$ python3 -m ksmi -c config.json -l
实用程序
复制ID
usage: copy_id.py [-h] [-n] [-c CONFIG] [-s SERVER]
optional arguments:
-h, --help show this help message and exit
-n, --new_id generate new id_rsa key
-c CONFIG, --config CONFIG
set config file to use host list
-s SERVER, --server SERVER
set a server to copy id
将ID(RSA)复制到服务器
与config.json
一起使用
$ python3 -m ksmi.copy_id -c config.json
or
$ python3 -m ksmi.copy_id --config config.json
与单个服务器地址一起使用
$ python3 -m ksmi.copy_id -s [username@]<IP>[:port]
or
$ python3 -m ksmi.copy_id --server [username@]<IP>[:port]
创建新的ID rsa
$ python3 -m ksmi.copy_id -n
or
$ python3 -m ksmi.copy_id --new_id