CoreElec HW monitor


#21

You have to do this:

opkg install bash tc coreutils-timeout

and you’ll get this nice screen without data:

and this error:

2018-09-26 23:22:04: netdata INFO : PLUGINSD[charts.d] : Initializing file /opt/var/cache/netdata/sensors.temp_thermal_zone0_thermal_thermal_zone0/main.db.
2018-09-26 23:22:04: netdata INFO : PLUGINSD[charts.d] : Initializing file /opt/var/cache/netdata/sensors.temp_thermal_zone0_thermal_thermal_zone0/sys_devices_virtual_thermal_thermal_zone0_temp.db.
/opt/lib/netdata/plugins.d/charts.d.plugin: Cannot use current_time_ms_from_uptime() - new time 510 is older than the last 82256790 - falling back to current_time_ms_from_date().
/opt/lib/netdata/plugins.d/loopsleepms.sh.inc: line 22: 1537996924 * 1000 + %-N / 1000000 : syntax error: operand expected (error token is "%-N / 1000000 ")
2018-09-26 23:22:04: netdata ERROR : PLUGINSD[charts.d] : read failed
2018-09-26 23:22:04: netdata ERROR : PLUGINSD[charts.d] : ‘/opt/lib/netdata/plugins.d/charts.d.plugin’ (pid 22207) disconnected after 0 successful data collections (ENDs).
2018-09-26 23:22:04: netdata ERROR : PLUGINSD[charts.d] : ‘/opt/lib/netdata/plugins.d/charts.d.plugin’ (pid 22207) does not generate useful output but it reports success (exits with 0). Waiting a bit before starting it again…


#22

I didn’t know, a bash installation was available in Entware.
That’s great…kind of…at least one step closer.

The main problem now seems to be this one (again executed charts.d.plugin with debug enabled):

2018-09-26 23:43:10: charts.d: INFO: main: started from '/opt/lib/netdata/plugins.d/charts.d.plugin' with options: debug 1
/opt/lib/netdata/plugins.d/loopsleepms.sh.inc: line 22: 1537998190 * 1000 + %-N / 1000000 : syntax error: operand expected (error token is "%-N / 1000000 ")
/opt/lib/netdata/plugins.d/loopsleepms.sh.inc: line 63: [: : integer expression expected
2018-09-26 23:43:10: charts.d: INFO: main: configuration file '/opt/lib/netdata/plugins.d/../../../../etc/netdata/charts.d.conf' not found. Using defaults.

This version of bash seems to have problems with calculations using $(( … )).
Furthermore it can’t find the file /opt/etc/netdata/charts.d.conf, though the path should be the right one.

EDIT: No, wait…the path to the charts.d.conf isn’t the right one, because it searches the file in /etc/netdata/ instead of /opt/etc/netdata.
At least, if I count the “…/” correctly, because my eyes begin to flicker, now. ^^


#23

I got it working :slight_smile:

with a nasty hack. Replace /opt/lib/netdata/plugins.d/loopsleepms.sh.inc with this one and voilà

edit: Wrong file, use this instead:

loopsleepms.sh.inc (5.0 KB)


#24

It works for me, too. :slight_smile:
Thank you for the hacked up file.

But I also changed line 125 in charts.d.plugin to the following one to get rid of the “configuration file not found” message:

myconfig="/opt/etc/netdata/charts.d.conf"


#25

Unfortunately in my install of coreelec, glibc 2.27/28 seems to missing. I’m not sure if that’s the way it should be.


#26

If you follow these steps, you shouldn’t have any problems:

Install Entware and reboot your box.

From ssh type this:
opkg install netdata bash tc coreutils-timeout

Unpack the attached file to /storage/.opt replacing the files.

netdata.zip (5.4 KB)

Now you can access the netdata dashboard from http://coreelec_box_ip:19999


#27

Excellent write up @Uukrul :+1:


#28

Excellent! @Uukrul
Entware Package Manager is the nicest thing added to CoreElec @adamg


#29

Maybe I am being obtuse this am, but I am unsure whether some specific files or complete directories should overwrite existing directories/files.

Would it be possible to post a couple of commands to ensure the correct procedure is followed?

Thank you.


#30

Here is a little script, which automates the installation:
entware_netdata.sh (649 Bytes)

After downloading it with wget, you need to add the execute flag:
chmod +x entware_netdata.sh


#31

Thank you.
That cleared up my confusion.

Also very nice to have a script to do the job without having to decide on paths :slight_smile:

Appreciate the help :wink:


#32

I’ve modified the System Overview to include the temperature:

netdata.zip (55.6 KB)


#33

very cool. Is it possbile to move the items or you have to do it?


#34

Nice to have temp up there with the rest! :smiley:

Thanks.


#35

If you only want to do a quick hack moving around gauges, edit /storage/.opt/share/netdata/web/index.html (function headMain(os, charts, duration) at pos 1656)


#36

I’ve added it to the install script I posted earlier:

@Uukrul:
Are your previous changes still included in the last zip you posted?


#37

Yes, they are.


#38

Thank you, it’s a great tool!

If you also want a graph of the CPU frequency, just uncomment “cpufreq = force” in /storage/.opt/etc/netdata/charts.d.conf


#39

Damn, I should have checked that before writing one for the sensors section. At least I prefer it near the temperatures graph so it isn’t time wasted. Here is one image with a comparison for the different governors:


#40

For the S912 cpu the built in tool even recognizes that there are two govenors: