Skip to content

Polling times can be slightly inconsistent #3101

Closed

Description

@lbsou

Hi!

This morning, I posted a spine issue, but since then, I realised it was probably more a poller.php bug.

Cacti/spine#123

Hi!

Describe the bug

Just installed a brand new cacti. I added all my devices (1400+) and it is now polling.

It is configured to poll every 10seconds with poller.php called every minute by crontab.

/etc/cron.d/cacti
*/1 * * * * root php /usr/share/cacti-1.2.7/poller.php > /dev/null 2>&1

image

The problem is that instead of the 10seconds intervals, it happen in 8 seconds and sleep at the end of the 6 polling sequence. (see screenshot)

To Reproduce
Configure same parameter as I did I suppose...

Expected behavior
As you can see in my other screenshot of my current production server, the interval are 10seconds.

Screenshots

image

For comparison, here is the CPU stats from my other server 0.8.8g

image

Server (please complete the following information):
Cacti 1.2.7
Spine 1.2.7
RedHat 8.1
PHP 7.3.12

Compiling (please complete the following information):

Activity

  1. bmfmancini commented on Nov 26, 2019

    @bmfmancini
    Member

    Sounds like something on RHEL more than on spine since cron would be the mechanisim that would initiate spine

    try this create a small script that echos the time to a text file and have it run at the same time restart the crond service to be sure it syncs up and compare if the echo and spine behave the same

  2. lbsou commented on Nov 26, 2019

    @lbsou
    Author

    /var/log/cron show that poller.php is launch by crontab exactly every minutes.

    And as you can see in the screenshot, poller.php launch spine every... 8 seconds or so.

  3. TheWitness commented on Nov 26, 2019

    @TheWitness
    Member

    Man, 10 seconds with 1400 devices. Must be a big box. I would suggest that this is a small issue in poller.php.

  4. TheWitness commented on Nov 26, 2019

    @TheWitness
    Member

    Hmm, seems a counter issue inside of poller.php. It should record the start time, and the end time, take the difference between that and the start of the next poll, and then sleep for that amount of time.

  5. lbsou commented on Nov 26, 2019

    @lbsou
    Author

    Ok, that's what I tought.

    FYI, running on a 20 x XeonE7-4850 v4 @ 2.10GHz
    @+!

  6. TheWitness commented on Nov 26, 2019

    @TheWitness
    Member

    Yea, that's a beast.

  7. added a commit that references this issue on Nov 27, 2019
  8. cigamit commented on Nov 27, 2019

    @cigamit
    Member

    Update your poller.php from branch 1.2.x and report back.

  9. lbsou commented on Nov 27, 2019

    @lbsou
    Author

    Yep, back to normal!
    image

    Thank you!

  10. changed the title [-]Poller.php polling... too fast?![/-] [+]Polling times can be slightly inconsistent due[/+] on Dec 7, 2019
  11. changed the title [-]Polling times can be slightly inconsistent due[/-] [+]Polling times can be slightly inconsistent[/+] on Feb 10, 2020
  12. locked and limited conversation to collaborators on Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behaviourresolvedA fixed issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions