Some weeks ago I’ve replaced the case of the ‘catcam’. A Raspberry Pi 3 which was running for 1.5 years without interruption with the nice script & python-upload triggered by a cronjob. And now the device freezes. Still running, but neither accessible via SSH nor VNC (of course, if SSH is not working ..).
I left the case open; removed the camera; upgraded kernel and Raspbian: nothing helped.
My last guess is that the camera stopped working. But to be sure I want to let the RPi3 long-time with temperature-logging. So … we need a simple program:
1 2 3 4 5 6 7 8 9 10 |
import os import time def measure_temp(): temp = os.popen("vcgencmd measure_temp").readline() return (temp.replace("temp=","")) while True: print(time.ctime() + " ## " + measure_temp()) time.sleep(1) |
executed like this, because else the output is buffered up to 4 or 8 kByte:
1 |
$ stdbuf -oL python temperature.py > worstLoggingEver.txt |
and the content of the textfile is something like:
1 2 |
Tue Mar 6 22:52:59 2018 ## 51.5'C Tue Mar 6 22:53:00 2018 ## 52.1'C |
Leave a Reply
You must be logged in to post a comment.