Skip to content

Add cross-platform health check fallbacks#35

Open
laukuanee wants to merge 1 commit into
weilixiong:mainfrom
laukuanee:codex/health-check-fallbacks-1
Open

Add cross-platform health check fallbacks#35
laukuanee wants to merge 1 commit into
weilixiong:mainfrom
laukuanee:codex/health-check-fallbacks-1

Conversation

@laukuanee

Copy link
Copy Markdown

Fixes #1.

Summary:

  • keeps the Linux /proc/meminfo and /proc/loadavg paths as the first-choice behavior;
  • adds non-Linux memory fallbacks via os.sysconf, macOS sysctl/vm_stat, and Windows GlobalMemoryStatusEx;
  • falls back to os.getloadavg() when /proc/loadavg is unavailable;
  • adds focused unit tests that simulate missing /proc paths and cover the new fallback behavior.

Verification:

  • python -m py_compile tools/health_check.py tools/test_health_check.py
  • python tools/test_health_check.py

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.

[$50 BOUNTY] [Python] Add cross-platform health check fallbacks

1 participant