Jump to content

BananaPi board no disk temp in rpimonitor


enredar

Recommended Posts

First of all sorry for my bad english and maybe a newbie question. 

Board: BananaPI M1

when I login I get this: 

 

ARMBIAN 5.31 stable Debian GNU/Linux 8 (jessie) 4.11.5-sunxi
CPU temp:      29°C             HDD temp:      27°C
Usage of /:    9% of 15G        storage/:      1% of 688G

 

I installed armbianmonitor with the command armbianmonitor -r 
I had no problems to put disk capacity and monitor services for samba and transmission.

But I can´t find the way to get the disk temp into rpimonitor, the graph show "undefined"

 

This is my temperature.conf in case was useful 
 

#######################################################################
# Extract CPU Temperature information
#  Page: 1
#  Information               Status     Statistics
#  - cpu temperature         - yes      - yes
########################################################################

dynamic.12.name=soc_temp
dynamic.12.source=/sys/devices/virtual/thermal/thermal_zone0/temp
dynamic.12.regexp=(.*)
dynamic.12.postprocess=$1/1000
dynamic.12.rrd=GAUGE


dynamic.13.name=disk_temp
dynamic.13.source=/tmp/disktemp
dynamic.13.regexp=(.*)
dynamic.13.postprocess=sprintf("%.1f", $1/100)
dynamic.13.rrd=GAUGE



web.status.1.content.4.name=Temperature
web.status.1.content.4.icon=cpu_temp.png

web.status.1.content.4.line.1=JustGageBar("Temperature", "°C", 40, data.soc_temp, 80, 100, 80)+" "+JustGageBar("Disk", "°C",0, data.disk_temp, 100,100,80,percentColors,45,50)



web.statistics.1.content.8.name=Temperature
web.statistics.1.content.8.graph.1=soc_temp
web.statistics.1.content.8.graph.2=disk_temp

web.statistics.1.content.8.ds_graph_options.soc_temp.label=Core temperature (°C)
web.statistics.1.content.8.ds_graph_options.disk_temp.label=Disk temperature (ºC)



 

I apreciate any hint or advice.

 

Thanks. 

 

Link to comment
Share on other sites

8 hours ago, enredar said:

HDD temp:      27°C

 

That's the result of this https://github.com/armbian/build/blob/e5579a0957fd7b394d3b418671b4f0f82b334be9/scripts/update-motd.d/30-sysinfo#L109

 

So you might succeed replacing 'dynamic.13.source=/tmp/disktemp' (which requires a daemon running in the background updating this file) with

dynamic.13.source=/usr/sbin/hddtemp -u C -nq /dev/sda

Since hddtemp works in your installation (not always the case since this package is unmaintained since many many years) it should work that way with RPi-Monitor too (when the disk is in standby/sleep state RPi-Monitor will show n/a or 0°C). Please report back so others can benefit.

 

Edit: dynamic.13.postprocess has to be adjusted as well of course.

Link to comment
Share on other sites

It´s a SATA disk. 

 

And you are right!!! 

 

I replaced two lines in the temperature.conf and it worked. 

 

1) Original line: 
dynamic.13.source=/tmp/disktemp
Edited line: 
dynamic.13.source=/usr/sbin/hddtemp -u C -nq /dev/sda

2) Original line:
dynamic.13.postprocess=sprintf("%.1f", $1/100)
Edited line: 
dynamic.13.postprocess=sprintf("%.1f", $1/1)

 

And now the disk temp varies around 25º/26º/27º

 

The final config file looks like this:

#######################################################################
# Extract CPU Temperature information
#  Page: 1
#  Information               Status     Statistics
#  - cpu temperature         - yes      - yes
#  - disk temperature        - yes      - yes
########################################################################

dynamic.12.name=soc_temp
dynamic.12.source=/sys/devices/virtual/thermal/thermal_zone0/temp
dynamic.12.regexp=(.*)
dynamic.12.postprocess=$1/1000
dynamic.12.rrd=GAUGE


dynamic.13.name=disk_temp
dynamic.13.source=/usr/sbin/hddtemp -u C -nq /dev/sda
dynamic.13.regexp=(.*)
dynamic.13.postprocess=sprintf("%.1f", $1/1)
dynamic.13.rrd=GAUGE



web.status.1.content.4.name=Temperature
web.status.1.content.4.icon=cpu_temp.png

web.status.1.content.4.line.1=JustGageBar("Temperature", "°C", 40, data.soc_temp, 80, 100, 80)+" "+JustGageBar("Disk", "°C",20, data.disk_temp, 80,100,80,percentColor$



web.statistics.1.content.8.name=Temperature
web.statistics.1.content.8.graph.1=soc_temp
web.statistics.1.content.8.graph.2=disk_temp

web.statistics.1.content.8.ds_graph_options.soc_temp.label=Core temperature (°C)
web.statistics.1.content.8.ds_graph_options.disk_temp.label=Disk temperature (ºC)


Thanks a lot! 

Link to comment
Share on other sites

20 minutes ago, enredar said:

dynamic.13.postprocess=sprintf("%.1f", $1/1)

 

Deleting the line or replacing it with 'dynamic.13.postprocess=' should produce same results since hddtemp outputs only integer values anyway.

 

BTW: If anyone is using mainline kernel with A10/A13/A20 devices a look at our extended RPi-Monitor templates is worth a look: https://github.com/armbian/build/tree/master/scripts/armbianmonitor/templates (for legacy kernel have a look above at @Tido's link)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines