You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Datasource Statistics may obtain invalid data for some rebooted devices #4495
I have been finding that from time to time dsstats will get invalid data and have to be purged. I have finally found a way to reproduce this issue on demand. Its not always this device or data type but here is an example of what happens when I reboot this Linux server.
@jdcoats, you need to update lib/dsstats.php, poller_dsstats.php and include/global_settings.php. After that see if you can reproduce again. Make sure the device has been up for a while and has a lot of traffic.
This change will implement RRDtool like clipping for COUNTERS and DERIVE type objects. If the resulting value is above the rrd_maximum value, it'll return NULL for the delta. A small gap will appear in the data, but that's fine. Maybe I can improve that. Not today.
It also addresses #4500, which will allow DSStats to finish sooner. Warning, the PHP processes take a lot of CPU.
changed the title [-]DSSTATS will get invalid data for some devices after reboot requiring purging of stats[/-][+]Datasource Statistics may obtain invalid data for some rebooted devices[/+]on Apr 3, 2022
Activity
TheWitness commentedon Dec 10, 2021
Just finishing this up today on my day off.
Fixing Issues #4495 and #4500 DSStats Issues
TheWitness commentedon Dec 10, 2021
@jdcoats, you need to update lib/dsstats.php, poller_dsstats.php and include/global_settings.php. After that see if you can reproduce again. Make sure the device has been up for a while and has a lot of traffic.
This change will implement RRDtool like clipping for COUNTERS and DERIVE type objects. If the resulting value is above the rrd_maximum value, it'll return NULL for the delta. A small gap will appear in the data, but that's fine. Maybe I can improve that. Not today.
It also addresses #4500, which will allow DSStats to finish sooner. Warning, the PHP processes take a lot of CPU.
jdcoats commentedon Dec 10, 2021
Thanks! No longer able to reproduce on demand.
TheWitness commentedon Dec 10, 2021
Cool. Ignore my other comment. The new parallel setting should speed things up too.
TheWitness commentedon Dec 10, 2021
Here is without boot.
Here is with boost.
jdcoats commentedon Dec 10, 2021
TheWitness commentedon Dec 10, 2021
Cool. You should try like 4 processes and see if it's better.
jdcoats commentedon Dec 10, 2021
Before:

After:

jdcoats commentedon Dec 11, 2021
8 processes is about as good as i can get
TheWitness commentedon Dec 11, 2021
I'm going to do a code review tomorrow to see if there is a way to squeeze a few more seconds out. Stay tuned. Glad the problem is fixed though.
jdcoats commentedon Dec 13, 2021
perfect
Fixing Issue #4509 - Slow Template Editing
[-]DSSTATS will get invalid data for some devices after reboot requiring purging of stats[/-][+]Datasource Statistics may obtain invalid data for some rebooted devices[/+]