What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags

View all Tags

SSH script advanced sensor for monitoring Nvidia GPU



Hi all,

I made a SSH script advanced sensor for monitoring Nvidia GPU. Please let's make it better together:



#Performance State (P0:max-P12:min)

b1=$(nvidia-smi -q --display=PERFORMANCE | grep "Performance State" | cut -d ':' -f 1)

b2=$(nvidia-smi -q --display=PERFORMANCE | grep "Performance State" | cut -d ':' -f 2 | tr -dc '0-9')

#GPU Current Temp

c1=$(nvidia-smi -q -d temperature | grep "GPU Current Temp" | cut -d ':' -f 1)

c2=$(nvidia-smi -q -d temperature | grep "GPU Current Temp" | cut -d ':' -f 2 | tr -dc '0-9')

#GPU usage (%)

d1=$(nvidia-smi -q --display=UTILIZATION | grep Gpu | cut -d ':' -f 1)

d2=$(nvidia-smi -q --display=UTILIZATION | grep Gpu | cut -d ':' -f 2 | tr -dc '0-9')

#Memory usage (%)

e1=$(nvidia-smi -q --display=UTILIZATION | grep "Memory" | head -1 | cut -d ':' -f 1)

e2=$(nvidia-smi -q --display=UTILIZATION | grep "Memory" | head -1 | cut -d ':' -f 2 | tr -dc '0-9')

echo "<prtg>


















Thank you in advance.


bash-script gpu nvidia ssh-advanced-custom-script

Created on Oct 22, 2020 9:42:24 AM

1 Reply




Thank you for sharing your script with the community. Have a nice day.

Kind regards.

Created on Oct 23, 2020 6:09:44 AM by  Florian Lesage [Paessler Support]

Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.