Comments (1)
Thanks for reporting! Hm.. yes, it looks like the swagger / OpenAPI file that's used for the API docs doesn't currently define a schema for the response; https://github.com/moby/moby/blob/v25.0.4/docs/api/v1.44.yaml#L7132-L7141, so currently (besides som "example" response), it only shows object
;
I think that may have been done because the response differs between Windows and Linux daemons and because some of the fields returned are raw data originating from the kernel / cgroups (and information provided for various of those depend on kernel version and cgroups used (v1/v2)). But we should look if we can improve that; at least for fields that do not depend on cgroups / cgroup-versions.
For these specific fields, you can refer to the Go documentation for the underlyling structs used here's the links for the current (v25.0.2) release of the Docker Engine;
github.com/docker/docker/api/types.CPUUsage
(source-code: https://github.com/moby/moby/blob/v25.0.4/api/types/stats.go#L19)github.com/docker/docker/api/types.CPUStats
(source-code: https://github.com/moby/moby/blob/v25.0.4/api/types/stats.go#L43)
Other stats-related structs can be found in the same file in the repository; https://github.com/moby/moby/blob/v25.0.4/api/types/stats.go
Some fields returned by the stats endpoint (as mentioned) may differ between platforms as they are collected from the underlying runtime (containerd, or the hcsshim runtime on Windows), and some of those are merely expose the underlying group data (for which you may have to refer to the Linux kernel documentation).
https://github.com/moby/moby/blob/v25.0.4/daemon/stats_unix.go#L89-L123
https://github.com/moby/moby/blob/v25.0.4/daemon/stats_windows.go#L45-L58
We should have a look though how much information we can add (or where needed, link to relevant (kernel) documentation).
from docs.
Related Issues (20)
- Are there two ways use btrfs? HOT 2
- Installing Docker Compose on Ubuntu 22.04 HOT 5
- Missing information on How can I merge organizations in Docker Hub? under FAQ
- Docker 25.0.3 - host.docker.internal HOT 1
- yarn install is not working HOT 2
- the example daemon.json file has an unnecessary comma HOT 2
- Requesting to change as required.
- Consideration for using "docker init" command in Docker documentation
- Behavior after a subscription is cancelled
- Missing 'external' source for secrets attribute HOT 3
- COPY --from option not included in heading or navigation HOT 1
- Missing info on deploying
- Install using the apt repository failed due to certif
- '"containerd-snapshotters": true' is incorrect
- Correct capitalization of L in GitLab
- Possible ambiguity about which directory the path to the Dockerfile is relative to HOT 1
- collapsed code-blocks are easy to miss HOT 3
- incorrect syntax for Dockerfile ENTRYPOINT HOT 1
- Wrong text
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs.