Ad Widget

Collapse

Don't have metrics about GPU Utilization

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tsvyake
    Junior Member
    • May 2019
    • 12

    #1

    Don't have metrics about GPU Utilization

    Hello Dear all, I encountered a problem specifically the parameter "GPU utilization" does not show, I tried three templates, all as one show the temperature aand how much GPU memory is used and free. All these three options of templates and scripts, including the one below, work perfectly on Ubuntu and show all the parameters

    Click image for larger version

Name:	Screenshot From 2024-12-09 21-21-06.png
Views:	358
Size:	37.3 KB
ID:	495637
    Click image for larger version

Name:	Screenshot From 2024-12-09 21-21-13.png
Views:	241
Size:	32.1 KB
ID:	495638

    I have Zabbix 7 Version
    System from which I take readings
    Debian 12 (6.1.0-28-amd64)
    Zabfix agent2

    config (for include)
    HTML Code:
    UserParameter=gpu.number,/usr/bin/nvidia-smi -L | /usr/bin/wc -l
    UserParameter=gpu.discovery,/etc/zabbix/scripts/get_gpus_info.sh
    UserParameter=gpu.fanspeed[*],nvidia-smi --query-gpu=fan.speed --format=csv,noheader,nounits -i $1 | tr -d "\n"
    UserParameter=gpu.power[*],nvidia-smi --query-gpu=power.draw --format=csv,noheader,nounits -i $1 | tr -d "\n"
    UserParameter=gpu.temp[*],nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits -i $1 | tr -d "\n"
    UserParameter=gpu.utilization[*],nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits -i $1 | tr -d "\n"
    UserParameter=gpu.memfree[*],nvidia-smi --query-gpu=memory.free --format=csv,noheader,nounits -i $1 | tr -d "\n"
    UserParameter=gpu.memused[*],nvidia-smi --query-gpu=memory.used --format=csv,noheader,nounits -i $1 | tr -d "\n"
    UserParameter=gpu.memtotal[*],nvidia-smi --query-gpu=memory.total --format=csv,noheader,nounits -i $1 | tr -d "\n"
    UserParameter=gpu.utilization.dec.min[*],nvidia-smi -q -d UTILIZATION -i $1 | grep -A 5  DEC | grep Min | tr -s ' ' | cut -d ' ' -f 4
    UserParameter=gpu.utilization.dec.max[*],nvidia-smi -q -d UTILIZATION -i $1 | grep -A 5  DEC | grep Max | tr -s ' ' | cut -d ' ' -f 4
    UserParameter=gpu.utilization.enc.min[*],nvidia-smi -q -d UTILIZATION -i $1 | grep -A 5  ENC | grep Min | tr -s ' ' | cut -d ' ' -f 4
    UserParameter=gpu.utilization.enc.max[*],nvidia-smi -q -d UTILIZATION -i $1 | grep -A 5  ENC | grep Max | tr -s ' ' | cut -d ' ' -f 4
    script get_gpus_info.sh
    HTML Code:
    #!/bin/bash
    
    result=$(/usr/bin/nvidia-smi -L)
    first=1
    
    echo "{"
    echo ""data":["
    
    while IFS= read -r line
    do
      if (( "$first" != "1" ))
      then
        echo ,
      fi
      index=$(echo -n $line | cut -d ":" -f 1 | cut -d " " -f 2)
      gpuuuid=$(echo -n $line | cut -d ":" -f 3 | tr -d ")" | tr -d " ")
      echo -n {""{#GPUINDEX}"":"$index"", "{#GPUUUID}"":"$gpuuuid"}
      if (( "$first" == "1" ))
      then
    #    echo ,
        first=0
      fi
    done < <(printf '%s\n' "$result")
    
    echo
    echo "]"
    echo "}"
  • Jan_Prusinowski
    Junior Member
    • Dec 2024
    • 6

    #2
    Have you made sure that the GPU driver is installed?
    Please try running the following command:
    Code:
    sudo apt install nvidia-driver nvidia-smi
    If this doesn't fix the issue, please provide logs that might indicate the problem.
    Last edited by Jan_Prusinowski; 11-12-2024, 11:52.

    Comment

    • tsvyake
      Junior Member
      • May 2019
      • 12

      #3
      Hello ,yes drivers all has been installed ,we can use GPUs

      pls see

      nvidia-smi
      Thu Dec 12 09:31:58 2024
      +-----------------------------------------------------------------------------------------+
      | NVIDIA-SMI 560.35.03 Driver Version: 565.57.01 CUDA Version: 12.7 |
      |-----------------------------------------+------------------------+----------------------+

      Comment

      Working...