All-Hands-AI / OpenHands

🙌 OpenHands: Code Less, Make More
https://all-hands.dev
MIT License
37.61k stars 4.25k forks source link

feat(runtime): add system resource metrics to /server_info endpoint #5207

Closed xingyaoww closed 6 days ago

xingyaoww commented 6 days ago

This PR adds CPU, memory, disk, and IO resource usage information to the /server_info endpoint response. The new metrics include:

This information will help monitor the resource utilization of the runtime server.


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:bfbbcce-nikolaik   --name openhands-app-bfbbcce   docker.all-hands.dev/all-hands-ai/openhands:bfbbcce