Skip to content

Datasource Statistics may obtain invalid data for some rebooted devices #4495

Closed

Description

@jdcoats

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.

image

2021/12/08 10:25:14 - CMDPHP intropage-hr Backtrace: (/plugins/intropage/intropage.php[39]:process_page_request_variables(), /plugins/intropage/include/functions.php[87]:intropage_detail_panel(), /plugins/intropage/include/functions.php[594]:busiest_traffic_detail(), /plugins/intropage/panellib/busiest.php[1143]:human_readable(), /plugins/intropage/include/functions.php[1579]:cacti_debug_backtrace())
--
2021/12/08 10:25:14 - CMDPHP INTROPAGE WARNING: Bytes = [4.919131751469E+18], Factor = [1024], i = [6] d = [1152921504606846976]

image

Activity

  1. added
    bugUndesired behaviour
    unverifiedSome days we don't have a clue
    on Dec 8, 2021
  2. self-assigned this
    on Dec 9, 2021
  3. TheWitness commented on Dec 10, 2021

    @TheWitness
    Member

    Just finishing this up today on my day off.

  4. added this to the v1.2.20 milestone on Dec 10, 2021
  5. added a commit that references this issue on Dec 10, 2021
  6. TheWitness commented on Dec 10, 2021

    @TheWitness
    Member

    @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.

  7. jdcoats commented on Dec 10, 2021

    @jdcoats
    Author

    Thanks! No longer able to reproduce on demand.

  8. TheWitness commented on Dec 10, 2021

    @TheWitness
    Member

    Cool. Ignore my other comment. The new parallel setting should speed things up too.

  9. TheWitness commented on Dec 10, 2021

    @TheWitness
    Member

    Here is without boot.

    image

    Here is with boost.

    image

  10. jdcoats commented on Dec 10, 2021

    @jdcoats
    Author

    image

  11. TheWitness commented on Dec 10, 2021

    @TheWitness
    Member

    Cool. You should try like 4 processes and see if it's better.

  12. jdcoats commented on Dec 10, 2021

    @jdcoats
    Author

    Before:
    image

    After:
    image

  13. jdcoats commented on Dec 11, 2021

    @jdcoats
    Author

    8 processes is about as good as i can get

    image

  14. TheWitness commented on Dec 11, 2021

    @TheWitness
    Member

    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.

  15. jdcoats commented on Dec 13, 2021

    @jdcoats
    Author

    perfect

  16. added a commit that references this issue on Dec 21, 2021
  17. locked and limited conversation to collaborators on Mar 14, 2022
  18. 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugUndesired behaviourdata collectionIssues related to data collectionresolvedA fixed issue

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions