Skip to content

wonjongg/nvidia-smi-plus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nvidia-smi++

A tool for enriching the output of nvidia-smi.

Additional features

When checking process information, you can get

  • a docker container name instead of an username
  • an execution command instead of a process name
  • a colored output for better readability

Notes: why do you want to check docker container name instead of an username?

If nvidia-docker users do not specify their username when executing their docker containers, usernames of processes are always 'root' by default. So, the username information isn't informative. Instead, I visualize a nvidia-docker container name to check who is running a process.

Install

pip3 install nvidia-htop

and copy nvidia-smi-plus.py into any directory you want. (recommend $HOME directory)

Then, chmod +x nvidia-smi-plus.py

It will make the file executable.

Add an alias into your ~/.zshrc or ~/.bashrc

alias nvidia-smi='$YOUR_DIRECTORY/nvidia-smi-plus.py'

If you want colored output,

alias nvidia-smi='$YOUR_DIRECTORY/nvidia-smi-plus.py -c'

If you want an output with commandline length,

alias nvidia-smi='$YOUR_DIRECTORY/nvidia-smi-plus.py -l'

Apply your updated file,

source ~/.zshrc # or
source ~/.bashrc

Usage

Just run the following command:

nvidia-smi

😊😊😊

Screenshot

Screenshot

Acknowledgements

This repo highly depends on https://github.com/peci1/nvidia-htop. Thanks for his nice work!

About

A tool for enriching the output of nvidia-smi.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages