On my TX2, I can use “sudo ~/tegrastats” to get GPU utilization in real time, like below
RAM 4722/7844MB (lfb 1x512kB) CPU [55%@2035,14%@2034,27%@2034,55%@2035,47%@2035,45%@2035] EMC_FREQ 2%@1866 GR3D_FREQ 71%@1300
APE 150 MTS fg 0% bg 0% BCPU@45C MCPU@45C GPU@51C PLL@45C AO@47.5C Tboard@37C Tdiode@46.75C PMIC@100C firstname.lastname@example.orgC VDD_IN 14025/14416 VDD_CPU 2209/2538 VDD_GPU 6854/6903 VDD_SOC 1371/1370 VDD_WIFI 19/19 VDD_DDR 2702/2702
I think GR3D_FREQ 71%@1300 is the GPU utilization rate.
However real time utilization cannot reflect the overall utilization, it may fluctuate from 10% - 99 %, is there a way to get the average utilization or reasonable utilization rate of the GPU?
What I did is that collect the printed out utilization status for 2 minutes and then calculate the average of percentage(GR3D_FREQ ??%@1300), but this seems not a smart way, is there a better approach to get the average utilization rate of GPU?