diff --git a/board/raspberrypi/overlay/usr/bin/gpu_stats b/board/raspberrypi/overlay/usr/bin/gpu_stats new file mode 100755 index 00000000000..fa58f7ac5f3 --- /dev/null +++ b/board/raspberrypi/overlay/usr/bin/gpu_stats @@ -0,0 +1,27 @@ +#!/bin/sh + +while true +do + TT=`vcgencmd get_throttled` + MM=`vcgencmd get_mem malloc` + MR=`vcgencmd get_mem reloc` + echo $TT, $MM, $MR + sleep 1 +done + +# vcgencmd get_mem +# Where type is: +# arm: total memory assigned to arm +# gpu: total memory assigned to gpu +# malloc_total: total memory assigned to gpu malloc heap +# malloc: free gpu memory in malloc heap +# reloc_total: total memory assigned to gpu relocatable heap +# reloc: free gpu memory in relocatable heap + +# vcgencmd get_throttled +# 0: under-voltage +# 1: arm frequency capped +# 2: currently throttled +# 16: under-voltage has occurred +# 17: arm frequency capped has occurred +# 18: throttling has occurred diff --git a/board/raspberrypi2/overlay/usr/bin/gpu_stats b/board/raspberrypi2/overlay/usr/bin/gpu_stats new file mode 100755 index 00000000000..fa58f7ac5f3 --- /dev/null +++ b/board/raspberrypi2/overlay/usr/bin/gpu_stats @@ -0,0 +1,27 @@ +#!/bin/sh + +while true +do + TT=`vcgencmd get_throttled` + MM=`vcgencmd get_mem malloc` + MR=`vcgencmd get_mem reloc` + echo $TT, $MM, $MR + sleep 1 +done + +# vcgencmd get_mem +# Where type is: +# arm: total memory assigned to arm +# gpu: total memory assigned to gpu +# malloc_total: total memory assigned to gpu malloc heap +# malloc: free gpu memory in malloc heap +# reloc_total: total memory assigned to gpu relocatable heap +# reloc: free gpu memory in relocatable heap + +# vcgencmd get_throttled +# 0: under-voltage +# 1: arm frequency capped +# 2: currently throttled +# 16: under-voltage has occurred +# 17: arm frequency capped has occurred +# 18: throttling has occurred diff --git a/board/raspberrypi3/overlay/usr/bin/gpu_stats b/board/raspberrypi3/overlay/usr/bin/gpu_stats new file mode 100755 index 00000000000..fa58f7ac5f3 --- /dev/null +++ b/board/raspberrypi3/overlay/usr/bin/gpu_stats @@ -0,0 +1,27 @@ +#!/bin/sh + +while true +do + TT=`vcgencmd get_throttled` + MM=`vcgencmd get_mem malloc` + MR=`vcgencmd get_mem reloc` + echo $TT, $MM, $MR + sleep 1 +done + +# vcgencmd get_mem +# Where type is: +# arm: total memory assigned to arm +# gpu: total memory assigned to gpu +# malloc_total: total memory assigned to gpu malloc heap +# malloc: free gpu memory in malloc heap +# reloc_total: total memory assigned to gpu relocatable heap +# reloc: free gpu memory in relocatable heap + +# vcgencmd get_throttled +# 0: under-voltage +# 1: arm frequency capped +# 2: currently throttled +# 16: under-voltage has occurred +# 17: arm frequency capped has occurred +# 18: throttling has occurred