What the heck are you using? Obviously the very 1st version that has been included by Xavier on his own. The commit I made contains an own binary that doesn’t use the syslog method:
OMG! Do you know that Linux uses a specific commit interval to write to disk, do you know that good distros (Armbian/Bananian) keep /var/log in RAM and only write from time to time to disk and do you know that even the cheapest SD cards do implement wear leveling?
Do you really believe when a process writes to a specific file that immediately the same cells on the SD card will be touched? Then you confuse SD cards with raw NAND and missed 30 years filesystem development. And Linux servers wouldn’t exist since they would be way too slow even for the most basic stuff (quite the opposite is true)
You might be affected if you use crappy OS images from LeMaker or SinoVoip. If you use Armbian for example (highly recommended) then /var/log/syslog will be written every 10 minutes only to SD card. And you can easily stop this by removing /usr/share/rpimonitor/scripts/bananian-temp-daemon.sh
This old daemon approach has never been intended to be used by anyone but it’s also no risk to let it run since you suffer from FUD regarding SD card wear-out. Simply delete it or use the right version:
Nope, the outdated RPi-Monitor version you’re using obviously relies on /usr/share/rpimonitor/scripts/bananian-temp-daemon.sh – as already said I never intended this script to be used productive. Xavier integrated it on his own but as also already said: it’s no risk. You suffer from wrong assumptions regarding disk access in Linux.
Simply delete it and stop crying. It’s not worth the tears.
I use the newest version RPi-Monitor but I don’t use your bananian-temp-daemon.sh script.
I use method that is implemented in Bananian (the newest version). soctemp and pmutemp.
So the problem is Bananian that use script modeled by your old script
@tkaiser
I want to use your bananian-temp-daemon.sh script. Do I need also use sunxi_tp_temp file?
I get /tmp/soctemp file empty now. I use Bananian with 3.4.x kernel
I don’t know why you are using this file here:
case $(uname -r) in
3.4.*)
if [ -x /usr/share/rpimonitor/scripts/sunxi_tp_temp ]; then
SoCTemp=$(/usr/share/rpimonitor/scripts/sunxi_tp_temp ${SoCTempAdjustment} | awk '{printf ("%0.0f",$1*1000); }')
fi
read PMUTemp </sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/temp1_input
;;
4.*)
# mainline kernel 4.0 or above, SoC temp should be available
read SoCTemp </sys/class/thermal/thermal_zone0/temp
esac
No, you can’t check raw disk access with any tool that monitors the filesystem (there’s a buffer in between). You would need a tool that is able to monitor disk device access. You could install nmon and switch to disk. But don’t do this since you will never be able to sleep again since you’ll have to realise that write access will happen from time to time (again: doesn’t matter at all. Wear Leveling exists)
Ok, believe what you want, do me a favor and just
apt-get remove rpimonitor
I case you want to learn something open up 2 terminal windows. In the first one fire up nmon and switch to disk view (shows device access and not filesystem activity) and in the other you let a script run indefinitely that writes every second to /var/log/test:
while true ; do touch /var/log/test ; sleep 1 ; done
I can’t remember whether Bananian really implements a higher commit interval since I switched to Armbian in early 2014. But I hope you get the idea what happens in Linux: Filesystem activity is not directly related to disk I/O. There’s a buffer in between.
A final word: soctemp and pmutemp are Bananian internal functions (also from me) that have to be called manually. I already suggested to Nico long time ago to replace them with sunxi_tp_temp but he never got back to me. RPi-Monitor uses either bananian-temp-daemon.sh (not recommended) or sunxi-temp-daemon.sh. Doesn’t matter whether you believe it or not.
No, you don’t want to use this since you fear SD card wear-out. Unfortunately it seems that the latest ‘stable’
RPi-Monitor release still contains this script that was never intended for general useage.
then chdir into RPi-Monitor and move axp209_cpu_pmu_temp.conf and sunxi_axp209.conf from rpimonitor/template/ to /etc/rpimonitor/template/ and move the two sunxi* file from scripts/ to /usr/share/rpimonitor/scripts/
sunxi_tp_temp is a binary that reads out the SoC’s temperature. Then all that’s necessary is described here (and maybe you’ve to look into /etc/rc.local also to see from where bananian-temp-daemon.sh is called to disable it):
@tkaiser
Thanks for your help I am using now your sunxi-temp-daemon.sh script.
I have values in disktemp and pmutemp files but soctemp file is empty.
I have sunxi-temp-daemon.sh and sunxi_tp_temp in /usr/share/rpimonitor/scripts
No idea. Try to execute sunxi_tp_temp manually. Chdir into the scripts folder and do a
./sunxi_tp_temp 1447
If nothing happens maybe execution permission is not granted (the do a “chmod 755 sunxi_tp_temp”).
BTW: Thx for making me aware of that RPi-Monitor when installed normally contains the wrong script. I’ll have to check that with Xavier… maybe merging the adjustments I made for H3 and A83T also.
Thanks you very much for help. I agree there should be changes in new version of RPi-Monitor and Bananian. I also consider to instal the newest Armbian on my Banana Pi