Skip to content

Some metrics never finish on slow machines (run_limited to be blamed) #123

@met

Description

@met

Summary

Hi, I have figured out just today that there are packages waiting for an update on several of my machines for days, but vserver-ssh-stats always displays 0 sensor.HOST_package_count and empty sensor.HOST_package_list.

The problem is run_limited timeouts that were introduced recently. I monitor some SBC computers (raspberry etc) that are slow and some metrics never run on them in timelimit of run_limited function. So they never finish and never give any proper result.

I was checking speed of remote_script.py and there are two really slow parts on SBC:

  • collect_pkg_updates()
  • read_docker_stats()

These two can take even 90% of whole remote_script.py time. The rest of the script run fast enough even on slow Raspberry Zero.

I was wondering if there is possible to separate these two slow functions from regular `remote_script; updates.

Because I want to collect remote_script every 30 seconds but collect_pkg_updates is twice a day enough for me. And read_docker_stats() maybe twice and hour.

Is it possible to remove these two from remote_script and run them with larger interval and also with much larger timeout?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions