Testers wanted: sunxi adjustments for RPi-Monitor


Recommended Posts

You can take armbianmonitor-daemon and these three templates:

And then rely on the discussions in these two threads:

to further improve this stuff. I won't look into it for at least a month or maybe even more.

Link to post
Share on other sites
Donate and support the project!

Hi tkaiser,

 

I am trying to add armbian monitoring staff in Armbian (kernel 4.4.6) but starting armbianmonitor-daemon reports that a lot of files from /etc/armbianmonitor and /etc/armbianmonitor/templates do not exists. I try to add them as a copy from rpimonitor or simply creating the empty once. Finally armbianmonitor-daemon starts but exits from some time.

 

As I see the files in /etc/armbianmonitor/datasources exist and have right values but reading discussions I cannot create the needed infrastructure and link it with rpimonitor.

 

Any help for that?

 

Best regards

Chris

Link to post
Share on other sites

starting armbianmonitor-daemon reports that a lot of files from /etc/armbianmonitor and /etc/armbianmonitor/templates do not exists.

 

As already said: i haven't touched this for a longer time and will not do the next time. We changed a few things in armhwinfo in the meantime that need adjustments. For example armhwinfo should be called not with ' start' but with ' query' instead and the $ID information might now differ since we tried to consolidate this some time ago.

 

So have a look at the query case in armhwinfo which variables get exported and check them afterwards:

. /etc/init.d/armhwinfo query
env

And please keep in mind that the whole approach should be rebuilt sometimes in the future based on a template system but that's postponed for now. And other stuff that should be integrated might only be available as part of the daemon inside this archive used with H3 boards. I simply hadn't the time/mood to improve that in the meantime and won't spend time on it the next weeks.

Link to post
Share on other sites

Tanks tkaizer,

 

I finally succeed to install and customize RPI Monitor 2.10 in Armbian 5.07 with Kernel 4.4.6 and run it on A20-Olinuxino-Lime2-eMMC.

 

I put all pointed by you staff in /etc/armbianmonitor and /etc/armbianmonitor/templates folders.

I modify /etc/armbianmonitor/armbian.conf as:

web.page.icon='img/armbian.png'
web.page.menutitle='Monitor ('+data.hostname+')'
web.page.pagetitle='Monitor ('+data.hostname+')'
web.status.1.name=Lime 2
web.statistics.1.name=Lime 2
web.addons.1.name=Addons
web.addons.1.addons=about

include=/etc/rpimonitor/template/version.conf

include=/etc/armbianmonitor/templates/uptime.conf
include=/etc/armbianmonitor/templates/axp209_template_battery.conf

include=/etc/rpimonitor/template/memory.conf
include=/etc/rpimonitor/template/swap.conf
include=/etc/rpimonitor/template/sdcard.conf
include=/etc/rpimonitor/template/network.conf

and link it to:

/etc/rpimonitor/data.conf -> /etc/armbianmonitor/armbian.conf

Some changes are also made to the following files:

/etc/armbianmonitor/templates/uptime.conf
/etc/armbianmonitor/templates/axp209_template_battery.conf

The results are published in my post.

 

Best regards

Chris

Link to post
Share on other sites

Do you still need people to test it out?

 

Nope, thanks. Next step would be to set up a sane set of templates for every board we support with at least the most basic functionality (cpufreq, temperature where available), debug templates that can be used/activated to show system behaviour more detailed (with the minor drawback of putting slightly more load on the system) and then disk and battery monitoring on top. 

 

But currently no time/mood to play with.

Link to post
Share on other sites

Hi to All,

 

After many hours of testing today I have found a strange phenomenon with SoC temperature on A20-Olinuxino-Lime2-eMMC falling with 19°C (from 52°C to 33°C).

A20 CPU has 20x20 Olimex heat sink.  PMU temperature measured is 33°C. All temperatures are measured by RPI Monitor customized to work with AXP209.

Measuring the SoC and PMU temperatures with infrared thermometer shows 34°C and 39°C. The test of heat sink with a hand definitely shows temperatures higher than 40°C.

 

The time when temperature has been changed (8:40 on 16 May) I test fresh build (all updated) for a while and then returns back to the build a few days old without removing the board power.

 

That is why I stopped the board for 15 minutes (21:15 on 16 May) with removing all power sources (DC-IN and battery). The result is restoration of previous CPU temperature figures.

Before starting the board I measured CPU (heat sink) and PMU temperatures of 27°C with infrared thermometer at environment temperature 25°C.

Immediately after starting the board CPU and PMU temperatures shown by RPI monitor are 45°C and 23°C and been very unlike the real once.

 

You can find PRI Monitor snapshot showing above observations.

 

There are another strange facts observed more then a month before:

 * 15°C CPU temperature difference between A20-Olinuxino-Lime2-eMMC (52°C) and A20-Olinuxino-Lime2-4GB (37°C) having the similar PCB design around CPU and

 * 18°C PMU temperature difference between A20-Olinuxino-Lime2-eMMC (27°C) and A20-Olinuxino-Lime2-4GB (45°C) having the similar PCB design around PMU

Temperatures ware measured by RPI Monitor with legacy kernel (3.4) for Lime2-4GB and with mainline one (4.4) for Lime2-eMMC.

Olimex answered that there is no reason for such differences because of PCB design similarity of both HW revisions.

 

All above temperatures are approximate because of a few degrees variation.

They are measured at idle mode with boards placed horizontally CPU up with heat sink in open ear.

 

All these observations rise some questions around accuracy of temperature measurements and possibility for verification.

 

Is there any assessment or ideas on how to do that?

 

Best regards

Chris

post-904-0-34077900-1463425836_thumb.jpg

Link to post
Share on other sites

You could have a look in the crappy LeMaker forum (tried it now but that's not only orphaned now but slow as hell too so I gave up). In Banana Pi / Projects section there's a thread from me regarding thermal readouts. A20 readouts still aren't calibrated and the thermal sensor inside A20 is there more by accident than by design (it's part of the touch panel controller).

 

These readouts are highly inaccurate on these SoCs (we experienced something similar with H3 where a thermal sensor is there for a reason: thermal protection. There we experienced lower readouts with mainline u-boot compared to Allwinner's BSP 2011.09 u-boot maybe related to clock differences).

 

Most importantly you should not trust in these readouts but instead still try to get the idea what might influence them. Please remember: We had situations with kernel 4.0 or 4.1 where A20 thermal readouts were way below ambient temperature (even below 0°C)

 

People love numbers without meaning, be it benchmark scores, thermal readouts or anything else. And that's wrong all the time.

Link to post
Share on other sites

Thanks tkaiser,

 

Probably this is the reason to get such a strange results for A20 CPU.

 

But what about PMU temperature readouts?

 

I plan to put the board inside a hermetic metal box with effective thermal conduction to its wall from all CPU, PMU, DRAM and eMMC chips.

In my experience PMU is the most loaded thermally mainly because of its small size.

On the other hand my expectation is all chips temperatures to be equalized with this design.

 

But any way I have to ensure against overheating.

 

Can PMU (AXP209) temperature sensor be used for overheating protection?

 

Best regards

Chris

Link to post
Share on other sites

Can PMU (AXP209) temperature sensor be used for overheating protection?

 

Sure, since thermal readouts are more reliable. In fact it provides over-temperature protection but the hard way (cutting power). And for the PMU temp to be really useful you have to know how many peripherals you're powering since temperature increases almost linearly with amount of power provided by the PMU.

 

can i use a bettery and RPI monitor with my PCDuini 3 Nano which i have laying around never even opened?

 

This board has neither a battery connector nor solder pads so no way to use a battery. The PMU would be capable but if a connector is missing...

Link to post
Share on other sites

Too bad :(

But i saw the video on http://www.armbian.com/pcduino3/, which A20 board has 2GB of RAM?

Mine only got 1GB. I'll try to run Armbian on mine when i get some time this summer. 

Thanks for you answer, @tkaiser

 

EDIT: i think i also need to consider buying one Olimex A20 board, but it's more expensive than pcduino3 nano.

Also need to do some research if there are newer and better alternatives.

Sorry if OT here!

 

 

 

Sure, since thermal readouts are more reliable. In fact it provides over-temperature protection but the hard way (cutting power). And for the PMU temp to be really useful you have to know how many peripherals you're powering since temperature increases almost linearly with amount of power provided by the PMU.

 

 

This board has neither a battery connector nor solder pads so no way to use a battery. The PMU would be capable but if a connector is missing...

Link to post
Share on other sites

which A20 board has 2GB of RAM? [...] Olimex A20 board, but it's more expensive than pcduino3 nano.

 

Cubietruck (the older version that is better than the new Cubietruck 'Plus') has 2 GB RAM: http://linux-sunxi.org/Sunxi_devices_as_NAS#Performance_tweaks

 

And http://linux-sunxi.org/Table_of_allwinner_based_boards

 

And regarding pricing: you get what you pay for -- as usual ;)

Link to post
Share on other sites

Thanks tkaiser,

 

Sure, since thermal readouts are more reliable. In fact it provides over-temperature protection but the hard way (cutting power). And for the PMU temp to be really useful you have to know how many peripherals you're powering since temperature increases almost linearly with amount of power provided by the PMU.

 

Today I have got OneWire and DS18B20 temperature sensors working with my Lime2-eMMC with Armbian 5.12 and kernel 4.5.5.

They were also added as data sources to RPI Minitor for forthcoming new series of power and thermal tests in hermetic metal box.

 

As a beginning I test the board in open air use case with 2 DS18B20 sensors measuring ambient and PMU temperatures.

I find a strange temperature difference between internal and external PMU sensors:

                   Internal (°C)      External (°C)    PMU Consumption (W)

Ambient                                  24(*)

       load < 0.3                                             1.2

CPU                46

PMU                31                   35(*)

       load ~2.3                                              2.0

CPU                 53

PMU                38                   40(*)

Notes:

  * the variations (not errors) of all above figures are less than 10%

  * the temperatures marked with (*) are verified (less than 5% difference) with precise infrared thermometer

  * DS18B20 sensor is mounted on top of PMU via 1mm adhesive thermal pad with 3 W/mK conductivity

 

I have had a filling for a system error in PMU (and probably CPU) temperature measures but for the first time I have a proof on it.

 

Could you point how and where to look for eventual measurement and/or calculation error sources?

It will also be helpful to post some links for assessment results or methodology if any.

 

Best regards

Chris

Link to post
Share on other sites

Just to be sure, you get 31°C internal and 35°C external temperature when being totally idle and 38°C vs. 40°C with some load?

 

Which data source are you using for the PMU currently? IIRC in mainline kernel there is no sysfs node provided, true?

Link to post
Share on other sites

Hi tkaiser,

 

Just to be sure, you get 31°C internal and 35°C external temperature when being totally idle and 38°C vs. 40°C with some load?

 

Which data source are you using for the PMU currently? IIRC in mainline kernel there is no sysfs node provided, true?

Yes and this is the fact forced me to think for a system measurement or calculation error.

 

I am using armbianmonitor you have helped me to install:

 

 

root@egpr:~# ls -la /etc/armbianmonitor/datasources/
total 8
drwxrwxr-x 2 root root 4096 May 27 10:45 .
drwxr-xr-x 4 root root 4096 May 11 16:30 ..
lrwxrwxrwx 1 root root   30 Apr 17 16:50 ac_current -> /sys/power/axp_pmu/ac/amperage
lrwxrwxrwx 1 root root   29 Apr 17 16:50 ac_voltage -> /sys/power/axp_pmu/ac/voltage
lrwxrwxrwx 1 root root   33 Apr 17 16:50 battery_charge -> /sys/power/axp_pmu/battery/charge
lrwxrwxrwx 1 root root   35 Apr 17 16:50 battery_charging -> /sys/power/axp_pmu/battery/charging
lrwxrwxrwx 1 root root   36 Apr 17 16:50 battery_connected -> /sys/power/axp_pmu/battery/connected
lrwxrwxrwx 1 root root   35 Apr 17 16:50 battery_current -> /sys/power/axp_pmu/battery/amperage
lrwxrwxrwx 1 root root   35 Apr 17 16:50 battery_percent -> /sys/power/axp_pmu/battery/capacity
lrwxrwxrwx 1 root root   34 Apr 17 16:50 battery_voltage -> /sys/power/axp_pmu/battery/voltage
lrwxrwxrwx 1 root root   35 Apr 17 16:50 charger_current -> /sys/power/axp_pmu/charger/amperage
-rwx--x--x 1 root root    0 Apr 13 17:14 disk-by-guid
lrwxrwxrwx 1 root root   27 Apr 17 16:50 pmictemp -> /sys/power/axp_pmu/pmu/temp
lrwxrwxrwx 1 root root   47 May 27 10:45 soctemp -> /sys/devices/virtual/thermal/thermal_zone0/temp
lrwxrwxrwx 1 root root   32 Apr 17 16:50 usb_current -> /sys/power/axp_pmu/vbus/amperage
lrwxrwxrwx 1 root root   31 Apr 17 16:50 usb_voltage -> /sys/power/axp_pmu/vbus/voltage

 

 

 

and customized version of RPI Monitor as described here.

 

Best regards

Chris

Link to post
Share on other sites

Hi tkaiser,

 

Yes and this is the fact forced me to think for a system measurement or calculation error.

 

I am using armbianmonitor you have helped me to install:

 

 

root@egpr:~# ls -la /etc/armbianmonitor/datasources/
total 8
drwxrwxr-x 2 root root 4096 May 27 10:45 .
drwxr-xr-x 4 root root 4096 May 11 16:30 ..
lrwxrwxrwx 1 root root   30 Apr 17 16:50 ac_current -> /sys/power/axp_pmu/ac/amperage
lrwxrwxrwx 1 root root   29 Apr 17 16:50 ac_voltage -> /sys/power/axp_pmu/ac/voltage
lrwxrwxrwx 1 root root   33 Apr 17 16:50 battery_charge -> /sys/power/axp_pmu/battery/charge
lrwxrwxrwx 1 root root   35 Apr 17 16:50 battery_charging -> /sys/power/axp_pmu/battery/charging
lrwxrwxrwx 1 root root   36 Apr 17 16:50 battery_connected -> /sys/power/axp_pmu/battery/connected
lrwxrwxrwx 1 root root   35 Apr 17 16:50 battery_current -> /sys/power/axp_pmu/battery/amperage
lrwxrwxrwx 1 root root   35 Apr 17 16:50 battery_percent -> /sys/power/axp_pmu/battery/capacity
lrwxrwxrwx 1 root root   34 Apr 17 16:50 battery_voltage -> /sys/power/axp_pmu/battery/voltage
lrwxrwxrwx 1 root root   35 Apr 17 16:50 charger_current -> /sys/power/axp_pmu/charger/amperage
-rwx--x--x 1 root root    0 Apr 13 17:14 disk-by-guid
lrwxrwxrwx 1 root root   27 Apr 17 16:50 pmictemp -> /sys/power/axp_pmu/pmu/temp
lrwxrwxrwx 1 root root   47 May 27 10:45 soctemp -> /sys/devices/virtual/thermal/thermal_zone0/temp
lrwxrwxrwx 1 root root   32 Apr 17 16:50 usb_current -> /sys/power/axp_pmu/vbus/amperage
lrwxrwxrwx 1 root root   31 Apr 17 16:50 usb_voltage -> /sys/power/axp_pmu/vbus/voltage

 

 

 

and customized version of RPI Monitor as described here.

 

Best regards

Chris

How did you get it to show all that info? I'm only able to see temp, when I run the same command.

Link to post
Share on other sites

Hi to All,

 

After some time without problems around RPI-Monitor I get into installation one.

There is a view changes after my last build: Armbian rev. from 5.12 to 5.14; Kernel rev. from 4.5.5 to 4.6.2.

When in firstrun script RPI-Minitor has to be installed apt-get rises following errors:

Get:46 https://github.com XavierBerger/RPi-Monitor-deb/raw/master/repo/ Translation-en_US
Get:47 https://github.com XavierBerger/RPi-Monitor-deb/raw/master/repo/ Translation-en
Get:48 https://github.com XavierBerger/RPi-Monitor-deb/raw/master/repo/ Translation-en_US.UTF-8
Err https://github.com XavierBerger/RPi-Monitor-deb/raw/master/repo/ Packages
  Bad header line
Get:49 https://github.com XavierBerger/RPi-Monitor-deb/raw/master/repo/ Translation-en_US
Ign https://github.com XavierBerger/RPi-Monitor-deb/raw/master/repo/ Translation-en_US
Get:50 https://github.com XavierBerger/RPi-Monitor-deb/raw/master/repo/ Translation-en
Ign https://github.com XavierBerger/RPi-Monitor-deb/raw/master/repo/ Translation-en
Get:51 https://github.com XavierBerger/RPi-Monitor-deb/raw/master/repo/ Translation-en_US.UTF-8
Ign https://github.com XavierBerger/RPi-Monitor-deb/raw/master/repo/ Translation-en_US.UTF-8
Fetched 11.5 MB in 18s (625 kB/s)
W: Failed to fetch https://github.com/XavierBerger/RPi-Monitor-deb/raw/master/repo/Packages  Bad header line

E: Some index files failed to download. They have been ignored, or old ones used instead.

and the package and its dependencies can not be installed.

 

I did not find a way to solve the problem so install them manually.

 

Any ideas how to install RPI-Minitor at the customization process preferably or using apt-get at the firstrun script?

 

Best regards

Chris

Link to post
Share on other sites

Hi to All,

 

After some time without problems around RPI-Monitor I get into installation one.

There is a view changes after my last build: Armbian rev. from 5.12 to 5.14; Kernel rev. from 4.5.5 to 4.6.2.

When in firstrun script RPI-Minitor has to be installed apt-get rises following errors:

Get:46 https://github.com XavierBerger/RPi-Monitor-deb/raw/master/repo/ Translation-en_US
Get:47 https://github.com XavierBerger/RPi-Monitor-deb/raw/master/repo/ Translation-en
Get:48 https://github.com XavierBerger/RPi-Monitor-deb/raw/master/repo/ Translation-en_US.UTF-8
Err https://github.com XavierBerger/RPi-Monitor-deb/raw/master/repo/ Packages
  Bad header line
Get:49 https://github.com XavierBerger/RPi-Monitor-deb/raw/master/repo/ Translation-en_US
Ign https://github.com XavierBerger/RPi-Monitor-deb/raw/master/repo/ Translation-en_US
Get:50 https://github.com XavierBerger/RPi-Monitor-deb/raw/master/repo/ Translation-en
Ign https://github.com XavierBerger/RPi-Monitor-deb/raw/master/repo/ Translation-en
Get:51 https://github.com XavierBerger/RPi-Monitor-deb/raw/master/repo/ Translation-en_US.UTF-8
Ign https://github.com XavierBerger/RPi-Monitor-deb/raw/master/repo/ Translation-en_US.UTF-8
Fetched 11.5 MB in 18s (625 kB/s)
W: Failed to fetch https://github.com/XavierBerger/RPi-Monitor-deb/raw/master/repo/Packages  Bad header line

E: Some index files failed to download. They have been ignored, or old ones used instead.

and the package and its dependencies can not be installed.

 

I did not find a way to solve the problem so install them manually.

 

Any ideas how to install RPI-Minitor at the customization process preferably or using apt-get at the firstrun script?

 

Best regards

Chris

 

install manually, but get error below

what's wrong???

 

pi@bananapim2plus:~/Downloads$ sudo dpkg -i rpimonitor_latest_all.deb
dpkg-deb: error: `rpimonitor_latest_all.deb' is not a debian format archive
dpkg: error processing archive rpimonitor_latest_all.deb (--install):
 subprocess dpkg-deb --control returned error exit status 2
Errors were encountered while processing:
 rpimonitor_latest_all.deb
Link to post
Share on other sites

In case anyone will provide a fix for this (also needed for 'armbianmonitor -r' to install RPi-Monitor) now would be the best time (since we want to release 5.15 rather sooner than later). So please come up with a working fix to be included :)

Downloading and installing .deb file manually (with all dependencies) without setting up repository?

 Depends: perl, librrds-perl, libhttp-daemon-perl (>= 6.0.0) | libwww-perl (<< 6.0.0), libjson-perl, libipc-sharelite-perl, libfile-which-perl, aptitude
apt-get install perl librrds-perl libhttp-daemon-perl libwww-perl libjson-perl libipc-sharelite-perl libfile-which-perl
wget -O rpimonitor_2.10-1_all.deb https://github.com/XavierBerger/RPi-Monitor-deb/blob/master/packages/rpimonitor_2.10-1_all.deb?raw=true
dpkg -i rpimonitor_2.10-1_all.deb
Link to post
Share on other sites

Downloading and installing .deb file manually (with all dependencies) without setting up repository?

 

Works on Xenial:

root@pcduino3nano:~# dpkg -l | grep rpi
ii  rpimonitor                          2.10-1                                   all          RPi-Monitor is a self monitoring application designed to run on Raspberry Pi.
root@pcduino3nano:~# uname -a
Linux pcduino3nano 4.6.2-sunxi #24 SMP Wed Jun 22 18:03:00 CEST 2016 armv7l armv7l armv7l GNU/Linux
root@pcduino3nano:~# lsb_release -c
Codename:	xenial

Do we need further tests or is it save to exchange the code in armbianmonitor (not being able to -- accidentally -- upgrade rpimonitord is IMO a feature and not a bug since Xavier included in his 2.11 beta a horribly outdated hack to read out A20 temperature)?

Link to post
Share on other sites

 

Downloading and installing .deb file manually (with all dependencies) without setting up repository?

 Depends: perl, librrds-perl, libhttp-daemon-perl (>= 6.0.0) | libwww-perl (<< 6.0.0), libjson-perl, libipc-sharelite-perl, libfile-which-perl, aptitude
apt-get install perl librrds-perl libhttp-daemon-perl libwww-perl libjson-perl libipc-sharelite-perl libfile-which-perl
wget -O rpimonitor_2.10-1_all.deb https://github.com/XavierBerger/RPi-Monitor-deb/blob/master/packages/rpimonitor_2.10-1_all.deb?raw=true
dpkg -i rpimonitor_2.10-1_all.deb

 

and finish with

apt-get -f install

in case the the apt-get install is not enough depending on the distro :)

Link to post
Share on other sites

Thanks Zador,

 

 

Downloading and installing .deb file manually (with all dependencies) without setting up repository?

 Depends: perl, librrds-perl, libhttp-daemon-perl (>= 6.0.0) | libwww-perl (<< 6.0.0), libjson-perl, libipc-sharelite-perl, libfile-which-perl, aptitude
apt-get install perl librrds-perl libhttp-daemon-perl libwww-perl libjson-perl libipc-sharelite-perl libfile-which-perl
wget -O rpimonitor_2.10-1_all.deb https://github.com/XavierBerger/RPi-Monitor-deb/blob/master/packages/rpimonitor_2.10-1_all.deb?raw=true
dpkg -i rpimonitor_2.10-1_all.deb

 

 

It works fine on my custom build for Lime2-eMMC.

Even thanks to your proposal I succeed to move all installation and customization staff to customize-image.sh:

		echo -e "Updating packages. It will take some time."
		apt-get -qq -y update >/dev/null 2>$1
		apt-get -qq -y upgrade >/dev/null >/dev/null 2>$1

		echo -e "RPI Monitor instalation."
		apt-get -f -qq -y install perl librrds-perl libhttp-daemon-perl libwww-perl libjson-perl libipc-sharelite-perl libfile-which-perl >/dev/null 2>$1
		wget -O rpimonitor_2.10-1_all.deb https://github.com/XavierBerger/RPi-Monitor-deb/blob/master/packages/rpimonitor_2.10-1_all.deb?raw=true >/dev/null 2>$1
		dpkg -i rpimonitor_2.10-1_all.deb >/dev/null 2>$1
		/usr/share/rpimonitor/scripts/updatePackagesStatus.pl >/dev/null 2>$1

		# RPI Monitor customization
		tar -zxvf /tmp/overlay/armbianmonitor.tar.gz -C / >/dev/null 2>$1
                cp /tmp/overlay/axp209_template_battery.conf /etc/armbianmonitor/templates/
                sed -i 's/storage=\/dev\/sda1/storage=\/dev\/sda2/g' /etc/update-motd.d/30-sysinfo        

                # Disable RPI Monitor embedded web server
                sed -i 's/#daemon.noserver=1/daemon.noserver=1/g' /etc/rpimonitor/daemon.conf
                # Setup to access RPI Monitor via nginx server default site
                ln -sf /usr/share/rpimonitor/web /var/www/html/rmon

Best regards

Chris

Link to post
Share on other sites
Guest
This topic is now closed to further replies.