-
Notifications
You must be signed in to change notification settings - Fork 459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix memory and swap values reported by 'iotedge check' and edge agent #6943
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
damonbarry
previously approved these changes
Mar 9, 2023
nlcamp
changed the title
Fix System Resources units conversion bug
Fix memory and swap values reported by 'iotedge check' and edge agent
Mar 10, 2023
damonbarry
approved these changes
Mar 10, 2023
nlcamp
added a commit
to nlcamp/iotedge
that referenced
this pull request
Mar 10, 2023
…Azure#6943) Fixes several bugs related to reported system RAM and swap values: 1. Units conversion bug introduced by a recent upgrade from sysinfo v0.25 to v0.27, resulting in edgeAgent_total_memory_bytes and edgeAgent_used_memory_bytes for "module_name=host" being 1024 times higher than the value previously reported in iotedge v1.4.3. 2. Long-standing bug in edgeAgent_total_memory_bytes and edgeAgent_used_memory_bytes for "module_name=host", where the reported values were 1.024 times higher than the actual values. This was caused by incorrectly treating the values returned by sysinfo v0.25 as KiB instead of KB. 3. Long-standing bug in system info reported by 'iotedge check', where the total_ram, total_swap, used_ram, and used_swap values were 1.024 times higher than the actual values. This was also caused by incorrectly treating the value returned by sysinfo v0.25 as KiB instead of KB. The changes in this PR have been tested by building an aziot-edge package using the CI pipeline and installing it on a VM device. The 'iotedge check' and edgeAgent metrics were then checked to confirm that the values are now correct. ## Azure IoT Edge PR checklist:
6 tasks
kodiakhq bot
pushed a commit
that referenced
this pull request
Mar 11, 2023
…#6953) Cherry-pick from (#6943) Fixes several bugs related to reported system RAM and swap values: 1. Units conversion bug introduced by a recent upgrade from sysinfo v0.25 to v0.27, resulting in edgeAgent_total_memory_bytes and edgeAgent_used_memory_bytes for "module_name=host" being 1024 times higher than the value previously reported in iotedge v1.4.3. 2. Long-standing bug in edgeAgent_total_memory_bytes and edgeAgent_used_memory_bytes for "module_name=host", where the reported values were 1.024 times higher than the actual values. This was caused by incorrectly treating the values returned by sysinfo v0.25 as KiB instead of KB. 3. Long-standing bug in system info reported by 'iotedge check', where the total_ram, total_swap, used_ram, and used_swap values were 1.024 times higher than the actual values. This was also caused by incorrectly treating the value returned by sysinfo v0.25 as KiB instead of KB. The changes in this PR have been tested by building an aziot-edge package using the CI pipeline and installing it on a VM device. The 'iotedge check' and edgeAgent metrics were then checked to confirm that the values are now correct. ## Azure IoT Edge PR checklist:
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes several bugs related to reported system RAM and swap values:
The changes in this PR have been tested by building an aziot-edge package using the CI pipeline and installing it on a VM device. The 'iotedge check' and edgeAgent metrics were then checked to confirm that the values are now correct.
Azure IoT Edge PR checklist:
This checklist is used to make sure that common guidelines for a pull request are followed.
General Guidelines and Best Practices
Testing Guidelines
Draft PRs
Draft
mode if it is:Note: We use the kodiakhq bot to merge PRs once the necessary checks and approvals are in place. When it merges a PR, kodiakhq converts the PR title to the commit title, PR description to the commit description, and squashes all the commits in the PR to a single commit. The net effect is that entire PR becomes a single commit. Please follow the best practices mentioned here for the PR title and description