From 6531029c5841ac9fa05cbb1e8afa35d15910bd86 Mon Sep 17 00:00:00 2001 From: Joo Aun Saw Date: Mon, 31 Jul 2017 12:12:53 +1000 Subject: [PATCH] added gpu_stat script to monitor GPU stats --- board/raspberrypi/overlay/usr/bin/gpu_stats | 27 ++++++++++++++++++++ board/raspberrypi2/overlay/usr/bin/gpu_stats | 27 ++++++++++++++++++++ board/raspberrypi3/overlay/usr/bin/gpu_stats | 27 ++++++++++++++++++++ 3 files changed, 81 insertions(+) create mode 100755 board/raspberrypi/overlay/usr/bin/gpu_stats create mode 100755 board/raspberrypi2/overlay/usr/bin/gpu_stats create mode 100755 board/raspberrypi3/overlay/usr/bin/gpu_stats 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