Skip to content

Add cross-platform health check fallbacks#56

Open
yiwei888 wants to merge 1 commit into
weilixiong:mainfrom
yiwei888:health-check-fallbacks
Open

Add cross-platform health check fallbacks#56
yiwei888 wants to merge 1 commit into
weilixiong:mainfrom
yiwei888:health-check-fallbacks

Conversation

@yiwei888

Copy link
Copy Markdown

Summary

Add cross-platform fallbacks for memory and load health checks when Linux /proc files are unavailable.

Changes

  • Keep existing /proc/meminfo and /proc/loadavg behavior where available.
  • Add memory fallback using Python standard-library system APIs.
  • Add load fallback using os.getloadavg when available.
  • Add focused tests that simulate missing /proc files.

Testing

  • python -m unittest tools.test_health_check - passed
  • python -m py_compile tools\health_check.py tools\test_health_check.py - passed
  • python build.py was attempted, but my local Windows environment is missing full project toolchains and npm is not available in PATH, so the full build could not complete.

Checklist

  • Relevant modules affected by these changes build locally
  • Tests pass locally
  • Diagnostic build log is committed in this PR
  • Documentation has been updated, if applicable
  • Configuration or schema changes are documented, if applicable
  • No generated build artifacts are committed, except the required diagnostic build log
  • Changes are scoped to the PR purpose and avoid unrelated cleanup
  • Security, privacy, and error-handling implications have been considered

  • I would like to request that my diagnostic build log is removed before merging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant