How to monitor the GCNANO GPU load
来自百问网嵌入式Linux wiki
Zhouyuebiao(讨论 | 贡献)2020年5月8日 (五) 22:40的版本 (创建页面,内容为“When a GPU animation is running on the display, the related GCNANO estimated GPU load can be monitored from the GCNANO driver level…”)
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:
Board $> (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:
Board $> cat /sys/kernel/debug/gc/idle Start: 3488941301162 ns End: 3549591148649 ns On: 26672154276 ns Off: 0 ns ...
<securetransclude src="ProtectedTemplate:PublicationRequestId" params="10256 | 2019-01-15 | PhilipS"></securetransclude>