Created
May 30, 2019 05:42
-
-
Save bigsan/29f16c3b1c446064c0a1451fadd11721 to your computer and use it in GitHub Desktop.
[Get hardware status of Raspberry Pi] Use vcgencmd to gather information of a running Raspberry Pi #raspi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# https://elinux.org/RPI_vcgencmd_usage | |
# https://blog.gtwang.org/iot/raspberry-pi-vcgencmd-hardware-information/ | |
# | |
# list avaiable commands | |
# vcgencmd commands | |
# | |
echo "=== clock freq ===" | |
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 | |
echo "=== voltage ===" | |
for id in core sdram_c sdram_i sdram_p ; do | |
echo -e "$id:\t$(vcgencmd measure_volts $id)" | |
done | |
echo "=== temperature ===" | |
vcgencmd measure_temp | |
echo "=== codec ===" | |
for codec in H264 MPG2 WVC1 MPG4 MJPG WMV9 ; do \ | |
echo -e "$codec:\t$(vcgencmd codec_enabled $codec)" ; \ | |
done | |
echo "=== config ===" | |
vcgencmd get_config int | |
echo "=== memory ===" | |
vcgencmd get_mem arm | |
vcgencmd get_mem gpu | |
echo "=== version ===" | |
vcgencmd version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment