#!/bin/sh

#modprobe vchiq

echo $(cat /proc/cpuinfo |grep Model|cut -d':' -f2)

# Measure Temperature
vcgencmd measure_temp pmic

dmesg|grep clk-bcm2835

vcgencmd get_config int | egrep "(arm|core|gpu|sdram)_freq|over_volt"

# Measure clock speeds
for src in arm core h264 isp v3d uart pwm emmc pixel vec hdmi dpi; do echo -e "$src:\t$(vcgencmd measure_clock $src)"; done

# Measure Volts
for id in core sdram_c sdram_i sdram_p ; do echo -e "$id:\t$(vcgencmd measure_volts $id)"; done

# See if we are being throttled
throttled="$(vcgencmd get_throttled)" 
echo -e "$throttled" 
if [[ $throttled != "throttled=0x0" ]]; then
    echo "WARNING: You are being throttled."
fi

#modprobe -r vchiq
