Putting iostat on dashboards.
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Controller Tests / controller-tests (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run

This commit is contained in:
Roland 2025-12-24 15:45:53 -07:00
parent 5d50562768
commit 5fb49ad001
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
6 changed files with 89 additions and 7 deletions

View file

@ -143,3 +143,14 @@ async def get_power(request: Request):
if cached and cached.get("power_stats"):
return JSONResponse(content=cached["power_stats"])
return JSONResponse(content=get_power_status())
@router.get("/iostat")
async def get_iostat(request: Request):
"""Get IO statistics (iowait, user, system, idle percentages)."""
cached = get_cached_status(request)
if cached and cached.get("iostat_stats"):
return JSONResponse(content=cached["iostat_stats"])
# Fallback to direct call
from controller.lib.status import get_iostat_status
return JSONResponse(content=get_iostat_status())