Is sensord supposed to work on a Pi? (If it matters, I've just started playing with a 2 B.) I installed the package, ran sensors-detect, patched one line of it [1], & ended up with "Sorry, no sensors were detected."
Is the sensord package supposed to work on the Pi, or is it just in the repository because it comes from upstream & compiles?
[1] this, but on a slightly different line number:
--
Master Foo said: "A man who mistakes secrets for knowledge is like
a man who, seeking light, hugs a candle so closely that he smothers
No it doesn't work; the Pi doesn't have any of the sensor chips used on PC motherboards which sensors-detect is looking for.
Below is something very similar using RRD. Put the following in a script file and get cron to run it every 5 minutes. You can then use the graphing tools with RRD in the same way as sensord does.
----- #!/bin/sh
rrd="/run/temp.rrd" if [ ! -e "$rrd" ] then echo 'recreating rrd file!' rrdtool create $rrd DS:temp:GAUGE:600:0:120000 RRA:AVERAGE:0.5:1:288 RRA:AVERAGE:0.5:7:288 fi
t1=`cat /sys/devices/virtual/thermal/thermal_zone0/temp` upper=84000 lower=0 if [ "$t1" -lt "$upper" -a "$t1" -gt "$lower" ] then t2=`cat /sys/devices/virtual/thermal/thermal_zone0/temp` if [ "$t2" -lt "$upper" -a "$t2" -gt "$lower" ] then tmp=$(($t1+$t2)) tmp=$(($tmp/2)) rrdtool update $rrd N:$tmp # echo "t1 = $t1, t2 = $t2, temp = $tmp" fi fi
OK, I guess it's just in the repository as a "left-over" from Debian.
Actually, it looks like all I need for now is this line:
which I'll combine with a syslog command, since I'm just used to finding that sort of thing in the syslog. But the database/graphing stuff looks interesting in the long run.
I guess the number that comes out is degrees C * 1000?
Thanks!
--
Our scientific power has outrun our spiritual power. We have guided
missiles and misguided men. --- Martin Luther King, Jr.
I see that command is well documented in the system: ;-)
$ man vcgencmd No manual entry for vcgencmd See 'man 7 undocumented' for help when manual pages are not available. $ vcgencmd --help error=1 error_msg="Command not registered" $ vcgencmd help error=1 error_msg="Command not registered"
Curiously, I get varying results from that while the thermal_zone0/temp file doesn't change:
I suspect it's just 'noise' on the sensor output. That's why my script takes two measurements and averages them. Occasionally I've seen completely wild figures, so the script rejects any nonsensical values.
On Fri, 12 Jun 2015 16:00:33 -0400, rickman declaimed the following:
But Chernobyl ensured the silence of the "Russian Woodpecker" (The Kenwood R-5000 actually had a second noise blanker function designed just for the woodpecker...)
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
My comment was meant to be somewhat hyperbolic about ignoring ``nonsensical'' temperatures. I should have realized that some people get political at the mention of nuclear and I apologize for thoughtlessly polluting the group.
Please. Any further discussion to e-mail or an appropriate group.
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.