RPi-Monitor for H3 看全部

Edited by bronco at 2015-12-23 23:09

UPDATE: A newer version that is easier to install can be found in this thread (the following might be worth a read though)

Hi,

I'm still waiting for 2 Orange Pi PC to arrive but prepared already a template for RPi-Monitor to get a clue what's going on. The get an idea what RPi-Monitor can do for you have a look at this A20 adoption (works on Orange Pi and Orange Pi Mini): http://forum.armbian.com/index.p ... ts-for-rpi-monitor/

With the H3 there's no need to run temperature daemons so it's just template stuff. Here's a draft template for H3 suitable to record and display the following:
  1. #  Information               Status     Statistics
  2. #  - cpu frequency           - yes      - yes
  3. #  - cpu load 1, 5, 15       - yes      - yes
  4. #  - cpu scaling governor    - yes      - no
  5. #  - cpus available          - yes      - yes
  6. #  - dram frequency          - yes      - yes
  7. #  - zone0 temperature       - yes      - yes
  8. #  - zone1 temperature       - yes      - yes


Installation (for experienced users!) is easy and takes just a couple of minutes:

1) Follow the simple instructions to install RPi-Monitor

2) Stop rpimonitor: "systemctl stop rpimonitor" ("service stop rpimonitor" prior to Jessie)

3) Save the draft template as /etc/rpimonitor/template/Allwinner_H3.conf

4) Create /etc/rpimonitor/template/OrangePi_H3.conf with the following contents
  1. web.page.icon='img/logo.png'
  2. web.page.menutitle='OPi-Monitor  <sub>('+data.hostname+')</sub>'
  3. web.page.pagetitle='OPi-Monitor ('+data.hostname+')'

  4. web.status.1.name=Orange Pi
  5. web.statistics.1.name=Orange Pi

  6. include=/etc/rpimonitor/template/version.conf
  7. include=/etc/rpimonitor/template/uptime.conf
  8. include=/etc/rpimonitor/template/Allwinner_H3.conf
  9. include=/etc/rpimonitor/template/memory.conf
  10. #include=/etc/rpimonitor/template/swap.conf
  11. include=/etc/rpimonitor/template/sdcard.conf
  12. include=/etc/rpimonitor/template/network.conf
5) Relink data.conf:
  1. ln -sf /etc/rpimonitor/template/OrangePi_H3.conf /etc/rpimonitor/data.conf
6) Start rpimonitor: "systemctl start rpimonitor" ("service start rpimonitor" prior to Jessie)

You can then connect with any modern browser to port 8888 of your OPi (cookies needed).

Caveats: I have no idea whether the template I hacked together works, which data sources thermal_zone0 and thermal_zone1 use and also no idea whether the check for active CPU cores works. Therefore this is currently something for more experienced users willing to fix stuff on their own.

EDIT: Template works, thermal values do now work, check for active CPU cores also works. Simply try it out using "echo 0 >/sys/devices/system/cpu/cpu3/online" (1 to re-enable).

In case you use Arch Linux a different RegEx to read-out available Memory is needed -- see below. Feedback regarding the template welcome.





  • 推荐 igorpec
  • 2015-12-23 23:09:35
quote:  I don't really understand why OPi PC is announced as 1,6GHz capable device.


Numbers sell.
  • Sofa fritz
  • 2015-11-22 07:12:34
This is how it looks with your configuration (unchanged):


PS. Your posting style reminds me a certain "emperor".

attachment: 您需要登录才可以下载或查看附件。没有账号?Register
  • Bench bronco
  • 2015-11-22 15:42:58
quote: fritz replied at 2015-11-22 07:12
This is how it looks with your configuration (unchanged):

Thanks for the feedback. The first thing that's strange is the temperature readout. What do you get when you do a
  1. cat /sys/devices/virtual/thermal/thermal_zone0/temp
On every platform these thermal values have to be divided by 1000 to get degree Celsius. Seems like this is patched somewhat and outputs already the divided value? In case you get degree celsius then the postprocessing filter has to be changed from "sprintf("%.1f", $1/1000)" to "" instead.

Then memory stats aren't working (this is Xavier's original stuff I never touched in /etc/rpimonitor/template/memory.conf) and since loboris' images doesn't seem to define swap you might comment out the "include=/etc/rpimonitor/template/swap.conf" in OrangePi_H3.conf and also adjust /etc/rpimonitor/template/sdcard.conf and comment out the /boot section.

Apart from that it seems it's working. After adjusting the temperature readouts it should be ready to tweak clock speeds (the far more interesting stuff doesn't happen on the status page but on statistics -- this is where you easily see how adjustments work when correcting clockspeeds of DRAM and CPU cores).
  • Floor fritz
  • 2015-11-22 20:23:38
  1. [fritz@alarm-OTT ~]$ cat /sys/devices/virtual/thermal/thermal_zone0/temp
  2. 45
  3. [fritz@alarm-OTT ~]$ cat /proc/meminfo
  4. MemTotal:        1026872 kB
  5. MemFree:          917080 kB
  6. Buffers:           14632 kB
  7. Cached:            54220 kB
  8. SwapCached:            0 kB
  9. Active:            27520 kB
  10. Inactive:          50132 kB
  11. Active(anon):       9040 kB
  12. Inactive(anon):      148 kB
  13. Active(file):      18480 kB
  14. Inactive(file):    49984 kB
  15. Unevictable:           0 kB
  16. Mlocked:               0 kB
  17. HighTotal:        270336 kB
  18. HighFree:         208864 kB
  19. LowTotal:         756536 kB
  20. LowFree:          708216 kB
  21. SwapTotal:             0 kB
  22. SwapFree:              0 kB
  23. Dirty:                 0 kB
  24. Writeback:             0 kB
  25. AnonPages:          8824 kB
  26. Mapped:            10972 kB
  27. Shmem:               380 kB
  28. Slab:              11748 kB
  29. SReclaimable:       5060 kB
  30. SUnreclaim:         6688 kB
  31. KernelStack:         656 kB
  32. PageTables:          384 kB
  33. NFS_Unstable:          0 kB
  34. Bounce:                0 kB
  35. WritebackTmp:          0 kB
  36. CommitLimit:      513436 kB
  37. Committed_AS:      29000 kB
  38. VmallocTotal:     245760 kB
  39. VmallocUsed:       16720 kB
  40. VmallocChunk:     212864 kB

I have now commented out the postprocessing filter for the thermal values.
memory stats does not work while there is no "MemAvailable" in /proc/meminfo
in memory.conf:
  1. web.status.1.content.5.line.1="Used: <b>" + KMG(data.memory_total-data.memory_available,'M')............


  • 5# bronco
  • 2015-11-22 21:13:56
Edited by bronco at 2015-11-23 03:16
quote: fritz replied at 2015-11-22 20:23
I have now commented out the postprocessing filter for the thermal values.
memory stats does not wo ...

Thx for the confirmation regarding thermal values. I already had a look through loboris' kernel sources and by looking into it I felt like the reporting is different due to thermal throttling values being specified "wrong" (already divided by 1000 in script.bin). Anyway, I corrected the template and exchanged the link in the original posting.
Regarding the memory stats: What's not working is to get "memory_available". Xavier tries to parse the output of "/usr/bin/free -mk" and Arch Linux requires another RegEx (I knew why I posted this into the Debian subforum ): https://github.com/XavierBerger/RPi-Monitor/issues/89


After the corrections made and rpimonitord being restarted it would be great if you could install the 'stress' tool and then execute the following:
  1. #!/bin/bash
  2. sleep 60
  3. echo 0 >/sys/devices/system/cpu/cpu3/online
  4. echo 0 >/sys/devices/system/cpu/cpu2/online
  5. sleep 60
  6. echo 480000 >/sys/devices/platform/sunxi-ddrfreq/devfreq/sunxi-ddrfreq/cur_freq
  7. sleep 60
  8. echo 1 >/sys/devices/system/cpu/cpu3/online
  9. echo 1 >/sys/devices/system/cpu/cpu2/online
  10. sleep 60
  11. echo 1008000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
  12. sleep 60
  13. echo 480000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
  14. sleep 60
  15. echo 1536000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
  16. echo 672000 >/sys/devices/platform/sunxi-ddrfreq/devfreq/sunxi-ddrfreq/cur_freq
And then directly a second time while in another shell there's running "stress -c 4 -m 2 -i 2" and then provide the "Load / Clockspeeds / Temperature" graph from the statistics page. Really curious how temperatures (consumption) differ.
1234.. 12NextPage