Giter Site home page Giter Site logo

Comments (4)

chengjoey avatar chengjoey commented on June 9, 2024

func (h *containerdContainerHandler) GetSpec() (info.ContainerSpec, error) {
// TODO: Since we dont collect disk usage stats for containerd, we set hasFilesystem
// to false. Revisit when we support disk usage stats for containerd
hasFilesystem := false
hasNet := h.includedMetrics.Has(container.NetworkUsageMetrics)
spec, err := common.GetSpec(h.cgroupPaths, h.machineInfoFactory, hasNet, hasFilesystem)
spec.Labels = h.labels
spec.Envs = h.envs
spec.Image = h.image
return spec, err
}

containerd not support fs disk usage yet

from cadvisor.

chengjoey avatar chengjoey commented on June 9, 2024

when use containerd cri, we could get mountinfo from proc/self/mountinfo like this:

2826 28 0:478 / /run/containerd/io.containerd.runtime.v2.task/k8s.io/02f14690a20e38c89d9f1c251b2b043c542e49d9aa62baa3408fb3e51d369819/rootfs rw,relatime shared:811 - overlay overlay rw,lowerdir=/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/66230/fs:/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/66153/fs:/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/66152/fs:/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/66151/fs:/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/59780/fs,upperdir=/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/66239/fs,workdir=/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/66239/work,index=off

Therefore, when we query the disk usage of contianerd, we can use this directory/run/containerd/io.containerd.runtime.v2.task/k8s.io/02f14690a20e38c89d9f1c251b2b043c542e49d9aa62baa3408fb3e51d369819/rootfs

from cadvisor.

chengjoey avatar chengjoey commented on June 9, 2024

get disk usage by containerd rootfs:
image

from cadvisor.

chengjoey avatar chengjoey commented on June 9, 2024

#3502

from cadvisor.

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.