From a few goole sources I put this script together to grab the cpu temperature, utilization, free memory and uptime from my raspberry pi weather station and write the results to my MySQL database.
I will use this data at some stage in my Weather Station project.
# Script to get Raspberry Pi temperate, cpu, memory, uptime and save data
# to mysql on suse.home. This will be used my the weather station web site system infomation
# Get temperature
temp=`/opt/vc/bin/vcgencmd measure_temp | cut -c 6-9`
# Get Uptime and convert to day h m s
To use the mysql client on the Pi you will need to first install it with:
sudo apt-get install mysql-client