Error on collectd sensor package

Running Itus Shield, not officially supported, mips64

Compiled from source, added the collectd package with mods for thermals and sensors (among other things)

Thermals shows up in luCi, but doesn't have a graph and can't be monitored. Sensor gives me a missing executable error.


grommish@norwits:~/openwrt/bin/targets/octeon/generic$ grep -ir "sensor" *
config.buildinfo:CONFIG_PACKAGE_collectd-mod-sensors=y
config.buildinfo:CONFIG_PACKAGE_libsensors=y
Binary file openwrt-octeon-itus-initramfs-kernel.bin matches
openwrt-octeon-itus.manifest:collectd-mod-sensors - 5.11.0-5
openwrt-octeon-itus.manifest:libsensors5 - 3.6.0-1

Below is my rrd directory listing

root@OpenWrt:~# ls -l /tmp/rrd/OpenWrt/*
/tmp/rrd/OpenWrt/cpu:
total 8
-rw-r--r--    1 root     root          7168 May 25 01:24 percent-active.rrd

/tmp/rrd/OpenWrt/interface-br-lan:
total 64
-rw-r--r--    1 root     root         13560 May 25 01:24 if_dropped.rrd
-rw-r--r--    1 root     root         13560 May 25 01:24 if_errors.rrd
-rw-r--r--    1 root     root         13560 May 25 01:24 if_octets.rrd
-rw-r--r--    1 root     root         13560 May 25 01:24 if_packets.rrd

/tmp/rrd/OpenWrt/load:
total 20
-rw-r--r--    1 root     root         19952 May 25 01:24 load.rrd

/tmp/rrd/OpenWrt/memory:
total 48
-rw-r--r--    1 root     root          7168 May 25 01:24 memory-buffered.rrd
-rw-r--r--    1 root     root          7168 May 25 01:24 memory-cached.rrd
-rw-r--r--    1 root     root          7168 May 25 01:24 memory-free.rrd
-rw-r--r--    1 root     root          7168 May 25 01:24 memory-slab_recl.rrd
-rw-r--r--    1 root     root          7168 May 25 01:24 memory-slab_unrecl.rrd
-rw-r--r--    1 root     root          7168 May 25 01:24 memory-used.rrd

Any suggestions would be appreciated!

The dependencies are a bit screwed in LuCI.
It checks the presence of sensors support by looking into the executable from lm-sensors package, although that is not actually needed for measurements (which done by the library).

If you have the correct config there already, the sensors graphs work with just libsensors and LuCI shos the graphs, but configuring the sensors requires lm-sensors.

opkg update
opkg install lm-sensors

Ps.
If there are no sensors defined explicitly, collectd will monitor all found, so this should be enough as config (work in my WRT3200ACM):

config statistics 'collectd_sensors'
        option enable '1'

You should be able to enable/disable the plugin itself from LuCI although you can't select individual sensors.

1 Like

Thanks!

I installed lm-sensor (though I had to compile everything again.. opkg doesn't work well with this arch and CPU) and the error went away, though I can't seem to get an output.

root@OpenWrt:/etc/config# find / -name lm-sensors
/lib/upgrade/keep.d/lm-sensors
/etc/init.d/lm-sensors
root@OpenWrt:/etc/config# ls -la /tmp/rrd/*/*
/tmp/rrd/OpenWrt/cpu:
total 8
drwxr-xr-x    2 root     root            60 May 25 07:21 .
drwxr-xr-x    7 root     root           140 May 25 07:27 ..
-rw-r--r--    1 root     root          7168 May 25 07:29 percent-active.rrd

/tmp/rrd/OpenWrt/interface-br-lan:
total 64
drwxr-xr-x    2 root     root           120 May 24 03:31 .
drwxr-xr-x    7 root     root           140 May 25 07:27 ..
-rw-r--r--    1 root     root         13560 May 25 07:29 if_dropped.rrd
-rw-r--r--    1 root     root         13560 May 25 07:29 if_errors.rrd
-rw-r--r--    1 root     root         13560 May 25 07:29 if_octets.rrd
-rw-r--r--    1 root     root         13560 May 25 07:29 if_packets.rrd

/tmp/rrd/OpenWrt/interface-eth0:
total 64
drwxr-xr-x    2 root     root           120 May 25 07:27 .
drwxr-xr-x    7 root     root           140 May 25 07:27 ..
-rw-r--r--    1 root     root         13560 May 25 07:29 if_dropped.rrd
-rw-r--r--    1 root     root         13560 May 25 07:29 if_errors.rrd
-rw-r--r--    1 root     root         13560 May 25 07:29 if_octets.rrd
-rw-r--r--    1 root     root         13560 May 25 07:29 if_packets.rrd

/tmp/rrd/OpenWrt/load:
total 20
drwxr-xr-x    2 root     root            60 May 24 03:31 .
drwxr-xr-x    7 root     root           140 May 25 07:27 ..
-rw-r--r--    1 root     root         19952 May 25 07:29 load.rrd

/tmp/rrd/OpenWrt/memory:
total 48
drwxr-xr-x    2 root     root           160 May 24 03:31 .
drwxr-xr-x    7 root     root           140 May 25 07:27 ..
-rw-r--r--    1 root     root          7168 May 25 07:29 memory-buffered.rrd
-rw-r--r--    1 root     root          7168 May 25 07:29 memory-cached.rrd
-rw-r--r--    1 root     root          7168 May 25 07:29 memory-free.rrd
-rw-r--r--    1 root     root          7168 May 25 07:29 memory-slab_recl.rrd
-rw-r--r--    1 root     root          7168 May 25 07:29 memory-slab_unrecl.rrd
-rw-r--r--    1 root     root          7168 May 25 07:29 memory-used.rrd

Is it possible this board doesn't HAVE any kind of thermal or other sensors on it? boggle

Sorry, this device was a limited Kickstarter run and the company has long since gone to the void, so I'm kind of feeling my way through it. Unfortunately, I can't get anything out of Marvell, so...

Most boards do not have any sensors.

Temperature monitoring is found mostly on some high-end routers, like mvebu, ipq806x, x86 based ones.

If your board has supported sensors, the "sensors" command from lm-sensors shows them. This is from my WRT3200ACM:

root@router3:~# sensors
tmp421-i2c-0-4c
Adapter: mv64xxx_i2c adapter
temp1:        +47.0°C
temp2:        +48.4°C

armada_thermal-virtual-0
Adapter: Virtual device
temp1:        +73.7°C

If there are no supported sensors, then naturally your collectd output is empty.

And there it is..

root@OpenWrt:/etc/config# sensors
No sensors found!
Make sure you loaded all the kernel drivers you need.
Try sensors-detect to find out which these are.
root@OpenWrt:/etc/config# sensors-detect
No i2c device files found.

I marked your previous answer as the solution, because it was..

Thank you again for all your help!

This device has space and speed, but is sparse elsewhere it seems!

Although, I swear I saw a patch for i2c on the Octeon III platform.. Time to hit the patches! I didn't know what the i2c meant :smiley:

Interesting..

@hnyman, I'm still trying to see if the i2c just isn't present on the board, or if I'm not doing something right with the build..

I removed i2c-tools and went with the busybox ones just to see the difference.

Using i2cdetect:

root@Shield:/# i2cdetect -l
i2cdetect: can't open '/sys/class/i2c-dev': No such file or directory

Using i2cdump:

root@Shield:/# i2cdump
BusyBox v1.31.1 () multi-call binary.

Usage: i2cdump [-fy] [-r FIRST-LAST] BUS ADDR [MODE]

Examine I2C registers

        I2CBUS  I2C bus number
        ADDRESS 0x03-0x77
MODE is:
        b       Byte (default)
        w       Word
        W       Word on even register addresses
        i       I2C block
        s       SMBus block
        c       Consecutive byte
        Append p for SMBus PEC

        -f      Force access
        -y      Disable interactive mode

I do not have a /sys/class/i2c-dev directory, but I do find the following:

root@Shield:/# find / -name *i2c*
/usr/lib/libi2c.so.0
/usr/lib/libi2c.so
/usr/lib/opkg/info/libi2c.control
/usr/lib/opkg/info/libi2c.prerm
/usr/lib/opkg/info/libi2c.list
/usr/lib/libi2c.so.0.1.1
/usr/sbin/i2cdetect
/usr/sbin/i2ctransfer
/usr/sbin/i2cget
/usr/sbin/i2cdump
/usr/sbin/i2cset
/sys/devices/platform/soc@0/1180000001000.i2c
/sys/bus/platform/devices/1180000001000.i2c
/sys/firmware/devicetree/base/soc@0/i2c@1180000001000
root@Shield:/# ls /sys/firmware/devicetree/base/soc@0/i2c@1180000001000
#address-cells   clock-frequency  name
#size-cells      compatible       reg
avr@68           interrupts       tlv-eeprom@56
root@Shield:/# 

Am I missing something, or did they simply not put anything on the board?

Appreciate any help you can give!

Sorry, no experience in debugging sensors.

But in WRT3200ACM there are a device in that directory:

root@router3:~# ls  /sys/class/i2c-dev/
i2c-0

root@router3:~# ls  /sys/class/i2c-dev/i2c-0/
dev        device     name       subsystem  uevent

It is quite possible that they have not enabled/wired/whatever the sensors even if the chip has something.

Additionally, my router has also a separate thermal device for CPU temp. Current temp is 62.263'C:

root@router3:~# cat  /sys/class/thermal/thermal_zone0/temp
62263
1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.