plambe / zabbix-nvidia-smi-multi-gpu

A zabbix template using nvidia-smi. Works with multiple GPUs on Windows and Linux.
Other
99 stars 54 forks source link

UserParameter=gpu.number only discovers GeForce Cards #5

Closed fz883 closed 6 years ago

fz883 commented 6 years ago

This part in the linux config file:

UserParameter=gpu.number,/usr/bin/nvidia-smi -L | /bin/grep GeForce | /usr/bin/wc -l makes Zabbix only detect GeForce cards, whereas Tesla's are ignored for example.

Why grep anyway?

[root@host~]# /usr/bin/nvidia-smi -L
GPU 0: Tesla V100-PCIE-16GB (UUID: GPU-yyyyyyyyy-xxxx-yyyyy-xxxx-yxyxyxyxyxyxy)
GPU 1: Tesla V100-PCIE-16GB (UUID: GPU-xxxxxxxxx-yyyy-xxxx-yyyy-xxxxyyyyyxxx)

It should be possible to grep for "GPU" and count those lines.

FYI:

[root@host~]# nvidia-installer -v

nvidia-installer:  version 396.26  (buildmeister@swio-display-x64-rhel04-19)  Mon Apr 30 18:40:31 PDT 2018
plambe commented 6 years ago

The grepping is a remnant of an early work in progress. I don't even remember why I did it, all I remember is that at some point I thought it's not worth removing it.

Feel free to create a pull request and I'll merge it.

plambe commented 6 years ago

Thanks for the commit!