get_throttled monitoring in Munin
Written by pmd - - no commentsInstall Munin
https://angristan.fr/monitorer-serveur-linux-munin/
Make a new pluggin
$ sudo nano /usr/share/munin/plugins/getthrottled
#!/bin/sh
#
# Munin plugin for measuring the core temperature of the BCM2835 SoC on a
# Raspberry Pi.
# https://github.com/munin-monitoring/contrib/blob/master/plugins/raspberry-pi/raspi_temp
#
# $ vcgencmd get_throttled
# throttled=0x50000
#
# 111100000000000001010
# |||| ||||_ under-voltage
# |||| |||_ currently throttled
# |||| ||_ arm frequency capped
# |||| |_ soft temperature reached
# ||||_ under-voltage has occurred since last reboot
# |||_ throttling has occurred since last reboot
# ||_ arm frequency capped has occurred since last reboot
# |_ soft temperature reached since last reboot
#
#
#
#
case $1 in
config)
cat <<'EOM'
graph_title Core Throttled
graph_vlabel Core has already throttled since reboot
graph_category sensors
graph_args --base 1000 -l 0
getthrottled.label Throttled since start
getthrottled2.label Currently throttled
EOM
exit 0;;
esac
echo "getthrottled2.value $(($(/opt/vc/bin/vcgencmd get_throttled | cut -c17-17)))"
echo "getthrottled.value $(($(/opt/vc/bin/vcgencmd get_throttled | cut -c13-14)))"
#!/bin/sh
#
# Munin plugin for measuring the core temperature of the BCM2835 SoC on a
# Raspberry Pi.
# https://github.com/munin-monitoring/contrib/blob/master/plugins/raspberry-pi/raspi_temp
#
# $ vcgencmd get_throttled
# throttled=0x50000
#
# 111100000000000001010
# |||| ||||_ under-voltage
# |||| |||_ currently throttled
# |||| ||_ arm frequency capped
# |||| |_ soft temperature reached
# ||||_ under-voltage has occurred since last reboot
# |||_ throttling has occurred since last reboot
# ||_ arm frequency capped has occurred since last reboot
# |_ soft temperature reached since last reboot
#
#
#
#
case $1 in
config)
cat <<'EOM'
graph_title Core Throttled
graph_vlabel Core has already throttled since reboot
graph_category sensors
graph_args --base 1000 -l 0
getthrottled.label Throttled since start
getthrottled2.label Currently throttled
EOM
exit 0;;
esac
echo "getthrottled2.value $(($(/opt/vc/bin/vcgencmd get_throttled | cut -c17-17)))"
echo "getthrottled.value $(($(/opt/vc/bin/vcgencmd get_throttled | cut -c13-14)))"
Then need to make it execuable :
$ sudo chmod +x /usr/share/munin/plugins/getthrottled
Test it as munin user :
$ sudo munin-run getthrottled
If you get that :
$ sudo munin-run getthrottled
getthrottled2.value i
getthrottled.value iz
$ sudo -u munin vcgencmd getthrottled
VCHI initialization failed
getthrottled2.value i
getthrottled.value iz
$ sudo -u munin vcgencmd getthrottled
VCHI initialization failed
Somehow you will need to add munin user in the video group :
sudo usermod -a -G video munin
Or maybe that was that helped :
$ sudo nano /etc/munin/plugin-conf.d/getthrottled
[getthrottled]
user root
[getthrottled]
user root
Then it will work :
$ sudo munin-run getthrottled
getthrottled2.value 2
getthrottled.value 20
getthrottled2.value 2
getthrottled.value 20
Restart what is necessary :
$ sudo service munin-node restart
Source : http://guide.munin-monitoring.org/en/latest/develop/plugins/howto-write-plugins.html