Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

[doc][develop] Add resource_monitor_plugin documentation #10308

Merged
merged 4 commits into from
Apr 28, 2021

Conversation

linhuang-blockone
Copy link
Contributor

ion for resource_monitor_plugin

Change Description

#9839
#10105
#10106
#10107

https://blockone.atlassian.net/browse/EPE-808
https://blockone.atlassian.net/browse/EPE-809

The corresponding PR for 2.1.x is #10307.

Add documentation for resource_monitor_plugin.

Change Type

Select ONE:

  • Documentation
  • Stability bug fix
  • Other
  • Other - special case

Testing Changes

Select ANY that apply:

  • New Tests
  • Existing Tests
  • Test Framework
  • CI System
  • Other

Consensus Changes

  • Consensus Changes

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

ion for resource_monitor_plugin
Copy link

@matthewdarwin matthewdarwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This documentation does not address the comment in #10106, specifically about how each data volume is monitored independently.

@linhuang-blockone
Copy link
Contributor Author

This documentation does not address the comment in #10106, specifically about how each data volume is monitored independently.

"the file systems" in the following quoted text are data volumes. Will reword to make it more specifically. "it measures the space used by the file systems mounted by data-dir, state-dir, blocks-log-dir, snapshots-dir, state-history-dir, and trace-dir."

@matthewdarwin
Copy link

Can the config options printed by nodeos also be improved similarly? (this would also require a nodeos code change presumably). Also why is it written %5 instead of 5%?

Config Options for eosio::resource_monitor_plugin:
+
+  --resource-monitor-interval-seconds arg (=2)
+                                        Time in seconds between two consecutive
+                                        checks of space usage. Should be
+                                        between 1 and 300.
+  --resource-monitor-space-threshold arg (=90)
+                                        Threshold in terms of percentage of used
+                                        space vs total space. If the used space is
+                                        within `%5` of the threshold, a warning is
+                                        generated. If used space is above the
+                                        threshold and `resource-monitor-not-shutdown-on-threshold-exceeded`
+                                        is enabled, a graceful shutdown is initiated;
+                                        otherwise a warning will be continuously
+                                        printed out.
+                                        The value should be between 6 and 99.
+  --resource-monitor-not-shutdown-on-threshold-exceeded
+                                        A switch used to indicate `nodeos` will "not"
+                                        shutdown when threshold is exceeded. When not
+                                        set, `nodeos` will shutdown.
+  --resource-monitor-warning-interval arg (=30)
+                                        Number of monitor intervals between
+                                        which a warning is displayed.
+                                        For example,
+                                        if `resource-monitor-warning-interval`
+                                        is set to `10` and 
+                                        `resource-monitor-interval-seconds` is 2, 
+                                        a warning will be displayed every 20 seconds,
+                                        even though the space usage is checked every
+                                        2 seconds.
+                                        This is used to throttle the number of
+                                        warnings in the `nodeos` log file.
+                                        Should be between 1 and 450.

@linhuang-blockone
Copy link
Contributor Author

Can the config options printed by nodeos also be improved similarly? (this would also require a nodeos code change presumably). Also why is it written %5 instead of 5%?

Config Options for eosio::resource_monitor_plugin:
+
+  --resource-monitor-interval-seconds arg (=2)
+                                        Time in seconds between two consecutive
+                                        checks of space usage. Should be
+                                        between 1 and 300.
+  --resource-monitor-space-threshold arg (=90)
+                                        Threshold in terms of percentage of used
+                                        space vs total space. If the used space is
+                                        within `%5` of the threshold, a warning is
+                                        generated. If used space is above the
+                                        threshold and `resource-monitor-not-shutdown-on-threshold-exceeded`
+                                        is enabled, a graceful shutdown is initiated;
+                                        otherwise a warning will be continuously
+                                        printed out.
+                                        The value should be between 6 and 99.
+  --resource-monitor-not-shutdown-on-threshold-exceeded
+                                        A switch used to indicate `nodeos` will "not"
+                                        shutdown when threshold is exceeded. When not
+                                        set, `nodeos` will shutdown.
+  --resource-monitor-warning-interval arg (=30)
+                                        Number of monitor intervals between
+                                        which a warning is displayed.
+                                        For example,
+                                        if `resource-monitor-warning-interval`
+                                        is set to `10` and 
+                                        `resource-monitor-interval-seconds` is 2, 
+                                        a warning will be displayed every 20 seconds,
+                                        even though the space usage is checked every
+                                        2 seconds.
+                                        This is used to throttle the number of
+                                        warnings in the `nodeos` log file.
+                                        Should be between 1 and 450.

Thanks for spotting %5. A typo. Will change. Will update options printed by nodeos in another PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants