A little script for you raspi users

mkdir /usr/local/sbin

Put the script as /usr/local/sbin/show_system_info

#!/bin/bash

# ANSI escape code for for clear screen, bash understands this # clear screen echo -e "\033[2J"

while [ 1 ] do # ANSI cursor to 0, 0 echo -e "\033[0;0H" cpuTemp0=$(cat /sys/class/thermal/thermal_zone0/temp) cpuTemp1=$(($cpuTemp0/1000)) cpuTemp2=$(($cpuTemp0/100)) cpuTempM=$(($cpuTemp2 % $cpuTemp1)) echo -e "CPU temp $cpuTemp1.$cpuTempM\xB0C" echo GPU $(/opt/vc/bin/vcgencmd measure_temp) echo for id in core sdram_c sdram_i sdram_p do echo -e "$id:\t$(vcgencmd measure_volts $id)" done echo 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 for codec in H264 MPG2 WVC1 MPG4 MJPG WMV9 do echo -e "$codec:\t$(vcgencmd codec_enabled $codec)" done echo vcgencmd get_config int echo vcgencmd version echo

# vcgencmd get_mem arm # vcgencmd get_mem gpu # echo echo if [ "$1" != "c" ] then echo "Use 'show_system_info c' for continuous mode." exit 0 fi sleep 1 done

------------------------ Call it like this (works great via ssh to monitor you raspi remotely): show_system_info c

(leave out the 'c' and it will only execute once).

It shows:

GPU temp=55.7'C

core: volt=1.20V sdram_c: volt=1.20V sdram_i: volt=1.20V sdram_p: volt=1.23V

arm: frequency(45)=700000000 core: frequency(1)=249999000 h264: frequency(28)=0 isp: frequency(42)=250000000 v3d: frequency(43)=250000000 uart: frequency(22)=3000000 pwm: frequency(25)=0 emmc: frequency(47)=100000000 pixel: frequency(29)=0 vec: frequency(10)=108000000 hdmi: frequency(9)=0 dpi: frequency(4)=0

H264: H264=enabled MPG2: MPG2=enabled WVC1: WVC1=disabled MPG4: MPG4=enabled MJPG: MJPG=enabled WMV9: WMV9=disabled

disable_overscan=1 framebuffer_depth=32 framebuffer_ignore_alpha=1 temp_limit=85

Feb 7 2013 16:46:17 Copyright (c) 2012 Broadcom version 367974 (release)

--------------------------- Wrote it to monitor temperature and voltage, added the rest too. Note the use of ANSI to do clear screen and the cursor position.

Cuppyrait (cccc) Jan Panteltje 2014 All Rights Taken Away Of You :-)

Reply to
Jan Panteltje
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.