Hi Stefan,

I thought I would give your modified modbus.c file a try.   It worked fine for 
awhile, but then it started reporting:

[2012-02-01 14:00:47] plugin_read_thread: Handling `modbus-10.1.2.2'.
[2012-02-01 14:00:47] Modbus plugin: modbus_read_registers (10.1.2.2) failed. 
Giving up.
[2012-02-01 14:00:47] Modbus plugin: modbus_read_registers (10.1.2.2) failed. 
Giving up.
[2012-02-01 14:00:47] Modbus plugin: modbus_read_registers (10.1.2.2) failed. 
Giving up.
[2012-02-01 14:00:47] Modbus plugin: modbus_read_registers (10.1.2.2) failed. 
Giving up.
[2012-02-01 14:00:47] Modbus plugin: modbus_read_registers (10.1.2.2) failed. 
Giving up.
[2012-02-01 14:00:47] Modbus plugin: modbus_read_registers (10.1.2.2) failed. 
Giving up.
[2012-02-01 14:00:47] Modbus plugin: modbus_read_registers (10.1.2.2) failed. 
Giving up.
[2012-02-01 14:00:47] Modbus plugin: modbus_read_registers (10.1.2.2) failed. 
Giving up.


Looking at the code (and i'm not a C programmer), I was wondering if you 
thought it would be good idea if the code was changed so if it hit this sort of 
failure it tries to reestablish the host connection again using a 
mb_init_connection?


Cheers,

Matt


> Hi Matt,
> 
> by now I'm running a somewhat more changed version that I put up at 
> https://github.com/snickl/collectd/tree/snickl/3-modbus-connect-handling (my 
> first attempt on github btw).
> 
> I also noticed that data stopped coming in after several hours, but from the 
> logs it looked more like modbus connection errors. Debug is enabled now, but 
> no problem for over a day. I'll sure check on zero values if it stalls again.
> 
> Cheers, Stefan


_______________________________________________
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd

Reply via email to