"C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe" --query-gpu=memory.total,memory.used --format=csv,noheader,nounits
-i參數(shù)指定哪一塊顯卡锰瘸,從0開始
新建gputotal0.bat
@echo off
"C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe" -i 0 --query-gpu=memory.total --format=csv,noheader,nounits>a0.txt
type a0.txt
新建gpuused0.bat
@echo off
"C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe" -i 0 --query-gpu=memory.used --format=csv,noheader,nounits>b0.txt
type b0.txt
zabbix配置里添加鍵值zabbix_agentd.win.conf
UnsafeUserParameters=1
UserParameter=gputotal0,D:\gputotal0.bat
UserParameter=gputotal1,D:\gputotal1.bat
UserParameter=gpuused0,D:\gpuused0.bat
UserParameter=gpuused1,D:\gpuused1.bat
Timeout=10