Skip to content

Instantly share code, notes, and snippets.

@pourmand1376
Created April 16, 2022 05:44
Show Gist options
  • Save pourmand1376/28444701263b2643df52d6a26615bfea to your computer and use it in GitHub Desktop.
Save pourmand1376/28444701263b2643df52d6a26615bfea to your computer and use it in GitHub Desktop.
Show User Info and CPU information per user in NVIDIA-SMI
nvidia-smi | tee /dev/stderr | awk '/ C / {print $3}' | xargs -r ps -up
@pourmand1376
Copy link
Author

pourmand1376 commented Apr 16, 2022

How to configure:

mkdir -p ~/bin/
echo "nvidia-smi | tee /dev/stderr | awk '/ C / {print $3}' | xargs -r ps -up" > bin/nvidia-smi2
chmod +x bin/nvidia-smi2

Then add this to your .profile:

if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

After that you can run nvidia-smi2 which shows full information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment