Last edited 3 years ago

How to monitor the GCNANO GPU load

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

When a GPU animation is running on the display, the related GCNANO estimated GPU load can be monitored from the GCNANO driver level, by using the following command:

 (while true; do (tr -d '\n' < /sys/kernel/debug/gc/idle | awk -F" " '{printf("gpu load %.0f%%\n", $6*100/($4-$2));}'); sleep 4; done) &

The GCNANO estimated GPU load is then periodically output in the user console as a percentage "%":

gpu load 75%
gpu load 75%
gpu load 75%

Notes:

  • Stop monitoring the GPU load with the command "kill -9 `ps -o ppid= -C sleep`".
  • Adjust the GPU load update period by modifying the "sleep" value (4 seconds in the example).
  • Use the command "dmesg -n8" to mix both user and kernel console outputs.
  • Debugfs configuration needs to be enabled.
  • The detailed calculation is: GPU load = On/(End-Start) with "On, End & Start" coming from the command:
 cat /sys/kernel/debug/gc/idle
Start:   3488941301162 ns
End:     3549591148649 ns
On:      26672154276 ns
Off:     0 ns
...