Collectd: rrdtool plugin: rrd_update_r failed illegal attempt to update using time

I've tried to monitor ath11k temp sensor a while ago and realized that collectd has difficulties with ath11k sensor (Device: Zyxel NBG7815).

The log is spammed as soon I enable monitoring ath11k_hwmon-isa-c000000 sensor in luci. There is created only one graph (we have 3 sensors) within luci showing some data sporadically (basically its empty):

daemon.err collectd[7221]: rrdtool plugin: rrd_update_r failed: /tmp/rrd/NBG7815/sensors-ath11k_hwmon-isa-c000000/temperature-temp1.rrd: illegal attempt to update using time 1686819473 when last update time is 1686819473 (minimum one second step)

I've found the following issue on Github related to atk10k which looks like its the same for ath11k:

Some outputs:

root@NBG7815:/sys# sensors 
Adapter: ISA adapter
temp1:        +62.0°C  

Adapter: QUP I2C adapter
temp1:        +61.0°C  (low  = -10.0°C, high = +60.0°C)

Adapter: MDIO adapter
temp1:        +70.4°C  (low  = +10.0°C, high = +60.0°C)  ALARM (HIGH, CRIT)
                       (crit low =  +0.0°C, crit = +70.0°C)

Adapter: ISA adapter
temp1:        +80.0°C  

Adapter: ISA adapter
temp1:        +59.0°C  

Adapter: ISA adapter
fan1:           0 RPM  (min =    0 RPM, max = 4500 RPM)


My question here is if the patch discussed on the Github issue is covering ath11k or not?

 	if ((!subsys || !strcmp(subsys, "platform") ||
 			!strcmp(subsys, "of_platform"))) {
 		/* must be new ISA (platform driver) */
-		if (sscanf(dev_name, "%*[a-z0-9_].%d", &entry->chip.addr) != 1)
-			entry->chip.addr = 0;
+		if (sscanf(dev_name, "%*[a-zA-Z0-9_]%*1[.:]%d", &entry->chip.addr) == 1);
+		else if (sscanf(dev_name, "%x.%*s", &entry->chip.addr) == 1);
+		else entry->chip.addr = 0;
 		entry->chip.bus.type = SENSORS_BUS_TYPE_ISA;
 		entry-> = 0;

My C knowledge is poor, but for me it looks like it is covered. But it does not work obviously.
If it not covered where to start to find the real issue here?

Hi! Have you managed to fix it?

No. It was easier for me to just grab and rework the fan script from zyxel with fan enabled in DTS. It is monitoring temps of wifi chips as well.

You can access the temps directly:


Running latest stable the path is without "@0".

I have no clue where I would have to integrate this path's to enable collectd/rrdtool to collect the temps for all 3 sensors. My impression was (if I remember correct) that everything depends on "c000000". rrdtool grabs just the first (hwmon/phy0). As there is no other distinction. So it would have to be sth. like c000000 & phy[0-9] to make it work for ath11k.

1 Like