guidol Posted April 1, 2018 Posted April 1, 2018 @Igor at the /etc/update-motd.d/30-sysinfo on my armbian debian stretch it didnt show the cpu-temp line after the login I did take a look at the file /etc/update-motd.d/30-sysinfo and didnt under stand the actual funtion getboardtemp: function getboardtemp() { if [ -f /etc/armbianmonitor/datasources/soctemp ]; then read raw_temp </etc/armbianmonitor/datasources/soctemp 2>/dev/null if [ ! -z $(echo "$raw_temp" | grep -o "^[1-9][0-9]*\.\?[0-9]*$") ] && (( $(echo "${raw_temp} < 200" |bc -l) $ # Allwinner legacy kernels output degree C board_temp=${raw_temp} else # Marvell gets special treatment for whatever reasons grep -qi Marvell /proc/cpuinfo && \ board_temp=$(( $(awk '{printf("%d",$1/1000)}' <<<${raw_temp}) - 20 )) || \ board_temp=$(awk '{printf("%d",$1/1000)}' <<<${raw_temp}) fi elif [ -f /etc/armbianmonitor/datasources/pmictemp ]; then # fallback to PMIC temperature board_temp=$(awk '{printf("%d",$1/1000)}' </etc/armbianmonitor/datasources/pmictemp) fi } # getboardtemp BUT if I did do it cut down to: function getboardtemp() { if [ -f /etc/armbianmonitor/datasources/soctemp ]; then # Allwinner legacy kernels output degree C board_temp=$(awk '{printf("%.2f",$1/1000)}' </etc/armbianmonitor/datasources/s$ elif [ -f /etc/armbianmonitor/datasources/pmictemp ]; then # fallback to PMIC temperature board_temp=$(awk '{printf("%d",$1/1000)}' </etc/armbianmonitor/datasources/pmi$ fi } # getboardtemp I do get a CPU-temp line at the Welcome-Message after the login-screen. For me it looks like that the mainline-kernel also output degree C (not only legacy like in the commecnt-line). My NanoPi Duo as Information: System diagnosis information will now be uploaded to http://ix.io/15r6
Recommended Posts