From 73b071edb0c8c0c63a22758a12704be8b1d9a521 Mon Sep 17 00:00:00 2001 From: tobi-wan-kenobi Date: Sun, 20 Dec 2020 15:11:35 +0100 Subject: [PATCH] [doc] clarify interval handling further fixes #751 --- docs/features.rst | 19 +++++++++++++++++++ docs/introduction.rst | 17 ++++++----------- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/docs/features.rst b/docs/features.rst index f48ebf0..f167033 100644 --- a/docs/features.rst +++ b/docs/features.rst @@ -1,6 +1,25 @@ Advanced usage =========================== +Intervals +--------- + +Some modules define their own update intervals (e.g. most modules that query +an online service), such as to not cause a storm of "once every second" queries. + +For such modules, the "global" interval defined via the ``interval`` parameter effectively defines the +highest possible "resolution". If you have a global interval of 10s, for example, +any other module can update at 10s, 20s, 30s, etc., but not every 25s. The status +bar will internally always align to the next future time slot. + +The update interval can also be changed on a per-module basis, like +this (overriding the default module interval indicated above): + +.. code-block:: bash + + $ ./bumblebee-status -m cpu memory -p cpu.interval=5s memory.interval=1m + + Events ------ diff --git a/docs/introduction.rst b/docs/introduction.rst index a27b8c7..7c3de02 100644 --- a/docs/introduction.rst +++ b/docs/introduction.rst @@ -56,20 +56,15 @@ To change the update interval, use: $ ./bumblebee-status -m -p interval= +The update interval is the global "refresh" interval of the modules (i.e. how often +the bar will be updated with new data). The default interval is one second. It is +possible to use suffixes such as "m" (for minutes), or "h" for hours (e.g. +``-p interval=5m`` to update once every 5 minutes. + Note that some modules define their own intervals (e.g. most modules that query an online service), such as to not cause a storm of "once every second" queries. -For such modules, the "global" interval defined here effectively defines the -highest possible "resolution". If you have a global interval of 10s, for example, -any other module can update at 10s, 20s, 30s, etc., but not every 25s. The status -bar will internally always align to the next future time slot. - -The update interval can also be changed on a per-module basis, like -this (overriding the default module interval indicated above): - -.. code-block:: bash - - $ ./bumblebee-status -m cpu memory -p cpu.interval=5s memory.interval=1m +For more details on that, please refer to :doc:`features`. All modules can be given “aliases” using ``:``, by which they can be parametrized, for example: