Hi everyone,
Hi Nvidia team
I want to get gpu Utilization with nvmlDeviceGetUtilizationRates(…) function, but it always returns not support,My GPU model is Quadro P5000。
I can use nvidia-smi.exe to get gpu usage, the log is as follows
==============NVSMI LOG==============
Timestamp : Wed Jul 17 18:25:36 2019
Driver Version : 385.54
Attached GPUs : 4
GPU 00000000:07:00.0
Product Name : Quadro P5000
Product Brand : Quadro
Display Mode : Disabled
Display Active : Disabled
Persistence Mode : N/A
Accounting Mode : Disabled
Accounting Mode Buffer Size : 1920
Driver Model
Current : WDDM
Pending : WDDM
Serial Number : N/A
GPU UUID : GPU-04770a66-3168-1a56-09b0-d774e80ee538
Minor Number : N/A
VBIOS Version : 86.04.2E.00.0D
MultiGPU Board : No
Board ID : 0x700
GPU Part Number : N/A
Inforom Version
Image Version : G001.0000.01.03
OEM Object : 1.1
ECC Object : N/A
Power Management Object : N/A
GPU Operation Mode
Current : N/A
Pending : N/A
GPU Virtualization Mode
Virtualization mode : None
PCI
Bus : 0x07
Device : 0x00
Domain : 0x0000
Device Id : 0x1BB610DE
Bus Id : 00000000:07:00.0
Sub System Id : 0x07B11028
GPU Link Info
PCIe Generation
Max : 3
Current : 1
Link Width
Max : 16x
Current : 16x
Bridge Chip
Type : N/A
Firmware : N/A
Replays since reset : 0
Tx Throughput : 0 KB/s
Rx Throughput : 0 KB/s
Fan Speed : N/A
Performance State : P8
Clocks Throttle Reasons
Idle : Active
Applications Clocks Setting : Not Active
SW Power Cap : Not Active
HW Slowdown : Not Active
Sync Boost : Not Active
SW Thermal Slowdown : Not Active
FB Memory Usage
Total : 16384 MiB
Used : 154 MiB
Free : 16230 MiB
BAR1 Memory Usage
Total : 256 MiB
Used : 5 MiB
Free : 251 MiB
Compute Mode : Default
Utilization
Gpu : 0 %
Memory : 0 %
Encoder : 0 %
Decoder : 0 %
My operation flow is
nvmlInit()---->nvmlDeviceGetCount()—>nvmlDeviceGetHandleByIndex()---->nvmlDeviceGetUtilizationRates()
I know that nvidia-smi also calls the nvml library, nvidia-smi can get the usage of gpu, but I can’t get it by writing my own program with nvml library.
thanks.