Sonntag, 5. Juli 2015

Show CPU temperature of RaspberryPi in shell

My DSLR-webcam is currently mounted on the southside of a roof.
At the moment germany is facing a strong heat-period.
So it's quite interesting to check the CPU-temp of the RaspberryPi.

You can do this by executing the following shell command:

vcgencmd measure_temp

In my case the output was today:

temp = 67.0'C

The datasheet of the CPU and also of the SD-card  says that these parts have a 'operating temperature' of -25 to +85 °C.
Everything OK here.

Just the EOS1100D operation is out of range:
Canon limits the official 'working temperature range' to 0-40°C


Sonntag, 28. Juni 2015

Issues with ISP DNS and no-ip.org URL

The ftp upload of the images showed some problems in these days:

The DNS information for the dyndns-url of no-ip.org was not correct.

During my tests I have seen, that the only way to get rid of the wrong DNS IP's is to overwrite the dynamic DNS-information in the raspberrypi, which was automatically set by DHCP IP-adress-retrieval.

The re-write for the DNS-adress can be done in /etc/resolv.conf
BUT: the DNS-information will be automatically overwritten at each DHCP-renewal or reboot of the raspberrypi.

Solution:
I created a small shell-script, which does the following:
- create a copy of the resolv.conf, without the "nameserver" information
- add the nameserver 8.8.8.8 to resolv.conf
- replace the original resolv.conf with the modified one


#!/bin/bash
cat /etc/resolv.conf | grep -v nameserver > /etc/resolv.conf.new
echo "nameserver 8.8.8.8" >> /etc/resolv.conf.new
mv /etc/resolv.conf.new /etc/resolv.conf


This script will be executed now, before the ftp-upload starts.