Last active
July 16, 2025 01:13
Revisions
-
padeoe revised this gist
Aug 20, 2024 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,6 @@ For typical use cases, I prefer using `nvitop` to view detailed information. This script offers a dependency-free implementation. The script enhances the functionality of `nvidia-smi` and provides the following info: - `Username` - `full process Command` -
padeoe revised this gist
Jul 8, 2023 . No changes.There are no files selected for viewing
-
padeoe revised this gist
Jul 6, 2023 . No changes.There are no files selected for viewing
-
padeoe renamed this gist
Jul 6, 2023 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
padeoe revised this gist
Jul 5, 2023 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,8 +9,10 @@ This is useful on multi-user servers and can be used to quickly identify which u ```bash nvidia-smi && (nvidia-smi |tr -s ' '|grep -Eo "| [0123456789]+ N/A N/A [0-9]{3,} .*"|awk -F' ' '{system("s=$(cat /proc/"$4"/cmdline| tr \"\\0\" \" \");u=$(ps -o uname= -p "$4");echo "$1"sep"$4"sep$u sep"$7"sep$s" ) }'|sed 's/sep/\t/g') ``` The output is like this ``` +-----------------------------------------------------------------------------+ | Processes: GPU Memory | -
padeoe revised this gist
Jul 5, 2023 . 1 changed file with 4 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,8 +9,7 @@ This is useful on multi-user servers and can be used to quickly identify which u ```bash nvidia-smi && (nvidia-smi |tr -s ' '|grep -Eo "| [0123456789]+ N/A N/A [0-9]{3,} .*"|awk -F' ' '{system("s=$(cat /proc/"$4"/cmdline| tr \"\\0\" \" \");u=$(ps -o uname= -p "$4");echo "$1"sep"$4"sep$u sep"$7"sep$s" ) }'|sed 's/sep/\t/g')``` The output is like this ``` +-----------------------------------------------------------------------------+ @@ -34,4 +33,6 @@ The output is like this 1 30439 root 199MiB /usr/bin/python -u /sentsim/train.py 2 3296 root 137MiB python playground2.py 2 21266 root 4735MiB /opt/conda/bin/python -u /cail/model.py ``` For convenience, you can alias the command. -
padeoe revised this gist
Jul 5, 2023 . 1 changed file with 19 additions and 14 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,21 +1,18 @@ This script enhances the functionality of `nvidia-smi` and provides the following information: - `Username` - `full process Command` - `GPU ID` - `PID` This is useful on multi-user servers and can be used to quickly identify which user is using the GPU and running what kind of program. ```bash nvidia-smi |tr -s ' '|grep -Eo "| [0123456789]+ N/A N/A [0-9]{3,} .*"|awk -F' ' '{system("s=$(cat /proc/"$4"/cmdline| tr \"\\0\" \" \");u=$(ps -o uname= -p "$4");echo "$1"sep"$4"sep$u sep"$7"sep$s" ) }'|sed 's/sep/\t/g' ``` The output is like this ``` +-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | @@ -29,4 +26,12 @@ As a compare, the output of `nvidia-smi` is | 2 3296 C python 137MiB | | 2 21266 C /opt/conda/bin/python 4735MiB | +-----------------------------------------------------------------------------+ 0 3296 user1 5825MiB python playground2.py 0 21266 user2 6319MiB /opt/conda/bin/python -u /cail/model.py 1 3299 root 137MiB python playground2.py 1 8063 root 273MiB /usr/bin/python -u /sentsim/cli_predict.py 1 21266 root 4735MiB /opt/conda/bin/python -u /cail/model.py 1 30439 root 199MiB /usr/bin/python -u /sentsim/train.py 2 3296 root 137MiB python playground2.py 2 21266 root 4735MiB /opt/conda/bin/python -u /cail/model.py ``` -
padeoe revised this gist
Jan 9, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ This script is based one `nvidia-smi`, but it can show complete process names and commands. ```bash nvidia-smi |tr -s ' '|grep -Eo "| [0123] [0-9]{3,} .*"|awk -F' ' '{system("s=$(cat /proc/"$2"/cmdline| tr \"\\0\" \" \");u=$(ps -o uname= -p "$2");echo "$1"sep$u sep"$5"sep$s" ) }'|sed -e 's/sep/\t/g' ``` The output is like this ``` -
padeoe revised this gist
Dec 23, 2019 . 1 changed file with 8 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,14 +4,14 @@ nvidia-smi |tr -s ' '|grep -Eo "| [0123] [0-9]{3,} .*"|awk -F' ' '{system("s=$(c ``` The output is like this ``` 0 root 5825MiB python playground2.py 0 root 6319MiB /opt/conda/bin/python -u /cail/model.py 1 root 137MiB python playground2.py 1 root 273MiB /usr/bin/python -u /sentsim/cli_predict.py 1 root 4735MiB /opt/conda/bin/python -u /cail/model.py 1 root 199MiB /usr/bin/python -u /sentsim/train.py 2 root 137MiB python playground2.py 2 root 4735MiB /opt/conda/bin/python -u /cail/model.py ``` As a compare, the output of `nvidia-smi` is -
padeoe revised this gist
Dec 23, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,8 +4,8 @@ nvidia-smi |tr -s ' '|grep -Eo "| [0123] [0-9]{3,} .*"|awk -F' ' '{system("s=$(c ``` The output is like this ``` 0 root 5825MiB python playground2.py 0 root 6319MiB /opt/conda/bin/python -u /cail/model.py 1 root 137MiB python playground2.py 1 root 273MiB /usr/bin/python -u /sentsim/cli_predict.py 1 root 4735MiB /opt/conda/bin/python -u /cail/model.py -
padeoe revised this gist
Dec 23, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,8 +9,8 @@ The output is like this 1 root 137MiB python playground2.py 1 root 273MiB /usr/bin/python -u /sentsim/cli_predict.py 1 root 4735MiB /opt/conda/bin/python -u /cail/model.py 1 root 199MiB /usr/bin/python -u /sentsim/train.py 2 root 137MiB python playground2.py 2 root 4735MiB /opt/conda/bin/python -u /cail/model.py ``` -
padeoe revised this gist
Dec 23, 2019 . 1 changed file with 8 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,14 +4,14 @@ nvidia-smi |tr -s ' '|grep -Eo "| [0123] [0-9]{3,} .*"|awk -F' ' '{system("s=$(c ``` The output is like this ``` 0 root 5825MiB python playground2.py 0 root 6319MiB /opt/conda/bin/python -u /cail/model.py 1 root 137MiB python playground2.py 1 root 273MiB /usr/bin/python -u /sentsim/cli_predict.py 1 root 4735MiB /opt/conda/bin/python -u /cail/model.py 1 root 199MiB /usr/bin/python -u /sentsim/train.py 2 root 137MiB python playground2.py 2 root 4735MiB /opt/conda/bin/python -u /cail/model.py ``` As a compare, the output of `nvidia-smi` is -
padeoe revised this gist
Dec 23, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ This script is based one `nvidia-smi`, but it can show complete process names and commands. ```bash nvidia-smi |tr -s ' '|grep -Eo "| [0123] [0-9]{3,} .*"|awk -F' ' '{system("s=$(cat /proc/"$2"/cmdline| tr \"\\0\" \" \");u=$(ps -o uname= -p "$2");echo -e "$1"sep$u sep"$5"sep$s" ) }'|sed -e 's/sep/\t/g' ``` The output is like this ``` -
padeoe created this gist
Jul 9, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ This script is based one `nvidia-smi`, but it can show complete process names and commands. ```bash nvidia-smi |tr -s ' '|grep -Eo "| [0-9]+ [0-9]{3,} .*"|awk -F' ' '{system("s=$(cat /proc/"$2"/cmdline);echo -e "$1"\t"$5"\t$s" ) }'|tr ' ' ' ' ``` The output is like this ``` 0 5825MiB pythonplayground2.py 0 6319MiB /opt/conda/bin/python-u/cail/model.py 1 137MiB pythonplayground2.py 1 273MiB /usr/bin/python-u/sentsim/cli_predict.py 1 4735MiB /opt/conda/bin/python-u/cail/model.py 1 199MiB /usr/bin/python-u/sentsim/train.py 2 137MiB pythonplayground2.py 2 4735MiB /opt/conda/bin/python-u/cail/model.py ``` As a compare, the output of `nvidia-smi` is ``` +-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | 0 3296 C python 5825MiB | | 0 21266 C /opt/conda/bin/python 6319MiB | | 1 3296 C python 137MiB | | 1 8063 C /usr/bin/python 273MiB | | 1 21266 C /opt/conda/bin/python 4735MiB | | 1 30439 C /usr/bin/python 199MiB | | 2 3296 C python 137MiB | | 2 21266 C /opt/conda/bin/python 4735MiB | +-----------------------------------------------------------------------------+ ```