Skip to content

Instantly share code, notes, and snippets.

@sumanssaurabh
Created March 31, 2019 22:21
Show Gist options
  • Save sumanssaurabh/9af9d7a56ec38ea2a35e755d549d690b to your computer and use it in GitHub Desktop.
Save sumanssaurabh/9af9d7a56ec38ea2a35e755d549d690b to your computer and use it in GitHub Desktop.
rpi configuration
#!/bin/bash
#vcgencmd measure_volts <id>
#Shows voltage. id can be one of core, sdram_c, sdram_i, sdram_p, and defaults to core if not specified
for id in core sdram_c sdram_i sdram_p ; do \
echo -e "$id:\t$(vcgencmd measure_volts $id)" ; \
done
#Shows core temperature of BCM2835 SoC.
vcgencmd measure_temp
#or
cpu=$(</sys/class/thermal/thermal_zone0/temp)
echo "$((cpu/1000)) c"
#Shows clock frequency, clock can be one of arm, core, h264, isp, v3d, uart, pwm, emmc, pixel, vec, hdmi, dpi
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
#Shows if the specified codec is enabled
for codec in H264 MPG2 WVC1 MPG4 MJPG WMV9 ; do \
echo -e "$codec:\t$(vcgencmd codec_enabled $codec)" ; \
done
# print the configurations
vcgencmd get_config int
#Shows how much memory is split between the CPU (arm) and GPU
vcgencmd get_mem arm && vcgencmd get_mem gpu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment