Git Product home page Git Product logo

Comments (1)

thaJeztah avatar thaJeztah commented on June 12, 2024

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;

Screenshot 2024-03-16 at 14 59 47

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;

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.