Raspberry Pi hints, tips and tricks

Bookmark and Share

Pi rocks!Below I’ve compiled a list of useful things regarding the Raspberry Pi that I found along the web:

Install hexxeh’s rpi-update tool:
sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && sudo chmod +x /usr/bin/rpi-update

Get CPU temperature:
vcgencmd measure_temp
(you can also watch the temperature by running “watch -d vcgencmd measure_temp”)

Get CPU temperature in milli-centigrades:
cat /sys/class/thermal/thermal_zone0/temp
(same as above, watch it via “watch -d cat /sys/class/thermal/thermal_zone0/temp”)

Get amount of network adapters received bytes:
cat /sys/class/net/eth0/statistics/rx_bytes
Get Megabytes:
awk ‘{printf(“%.1f\n”,$1/1024/1024)}’ “/sys/class/net/eth0/statistics/rx_bytes”

Get amount of network adapters sent bytes:
cat /sys/class/net/eth0/statistics/tx_bytes
Get Megabytes:
awk ‘{printf(“%.1f\n”,$1/1024/1024)}’ “/sys/class/net/eth0/statistics/tx_bytes”

Get the Pi’s MAC address:
cat /sys/class/net/eth0/address

Show CPU clock frequency:
vcgencmd measure_clock arm
Show all available clock frequencies:
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

Show core voltage:
vcgencmd measure_volts core
Show all voltages:
for id in core sdram_c sdram_i sdram_p ; do echo -e “$id:\t$(vcgencmd measure_volts $id)” ; done

the mentioned folders contain more possible values, but imho none of them are really interesting or useful. Let me know if you found anything else and I’ll add it here. Thanks!

Tagged , , , , , , , , . Bookmark the permalink.

One Response to Raspberry Pi hints, tips and tricks

  1. Big Dave says:

    Actually, these relate to Raspbian OS. Many other operating systems exist for the r-Pi and not all of them have compatibility with these instructions.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>