If you're a hardcore GPU user, and if you are competing with your collegues for the usage of lab's GPU, this tool is for you.
gpwho???!! is a GPU usage logger, with optional Telegram bot integration. It logs who is using the GPU and when.
- GPU
python3.7+
- Not tested with other versionssudo apt install gpustat
- Consult gpustat for other methods of installation.
git clone https://github.com/francesco-p/gpwho && cd gpwho
pip install -r requirements.txt
python gpwho.py
- This script starts logging intodetailed_usage.csv
file. It measures the GPU usage every 20 seconds. You can alter this parameter directly inside the script.
-
If you want a Telegram bot:
- Ask a token to @BotFather and put it inside
tgram.py
. - While
gpwho.py
is running open another terminal and runpython tgram.py
. - Start the newly created bot and visualize the status through the command
/status
.
- Ask a token to @BotFather and put it inside
-
If you do not want the bot:
- While
gpwho.py
is running open another terminal and runpython plot.py
. - Visualize the newly created
status.png
image.
- While
-
Q. I have more than one gpu and I want to control let's say only the second one. How can I do it?
-
A. You have to alter
main_regex
ingpwho.py
file. In particular you can change the GPU idr"\[1\] GeForce blabla...
. This tool has been developed for one GPU only but if you want to extend it to handle more than one GPUs make a pr! -
Q. You are awesome, how can I help you getting more GPUs?
-
A. Thanks, if you feel that I'm particularly cool to you then just consider "🍕 Buy lakj a slice of Pizza" I have enough of GPUs...