Skip to content

Commit

Permalink
added gpu_stat script to monitor GPU stats
Browse files Browse the repository at this point in the history
  • Loading branch information
jasaw committed Jul 31, 2017
1 parent 573d44a commit 6531029
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 0 deletions.
27 changes: 27 additions & 0 deletions board/raspberrypi/overlay/usr/bin/gpu_stats
Original file line number Diff line number Diff line change
@@ -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 <type>
# 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
27 changes: 27 additions & 0 deletions board/raspberrypi2/overlay/usr/bin/gpu_stats
Original file line number Diff line number Diff line change
@@ -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 <type>
# 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
27 changes: 27 additions & 0 deletions board/raspberrypi3/overlay/usr/bin/gpu_stats
Original file line number Diff line number Diff line change
@@ -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 <type>
# 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

0 comments on commit 6531029

Please sign in to comment.