Git Product home page Git Product logo

Comments (16)

rjnagal avatar rjnagal commented on May 7, 2024 1

--docker_only=true would filter cgroups to only report docker and root containers.

from cadvisor.

vmarmol avatar vmarmol commented on May 7, 2024

👍

from cadvisor.

rjnagal avatar rjnagal commented on May 7, 2024

some cgroups are under /system.slice/docker-*. lmctfy stats doesn't detect that. It should use device or cpu cgroup to detect. For libcontainer, one way to track stats is to use nsinit pid and find paths using /proc/pid-nsinit/cgroups

$ ps -efww | grep cadvisor
root 3490 3362 0 21:26 ? 00:00:00 /bin/sh -c /usr/bin/cadvisor
root 3514 3490 0 21:26 ? 00:00:02 /usr/bin/cadvisor
$ cat /proc/3490/cgroup
10:perf_event:/
9:blkio:/system.slice/docker-d293e6edbf522628caf322c1d603ddbfbd891c7014e7a747e1bb4bfa122d3b1f.scope
8:net_cls:/
7:freezer:/
6:devices:/system.slice/docker-d293e6edbf522628caf322c1d603ddbfbd891c7014e7a747e1bb4bfa122d3b1f.scope
5:memory:/system.slice/docker-d293e6edbf522628caf322c1d603ddbfbd891c7014e7a747e1bb4bfa122d3b1f.scope
4:cpu,cpuacct:/system.slice/docker-d293e6edbf522628caf322c1d603ddbfbd891c7014e7a747e1bb4bfa122d3b1f.scope
3:cpuset:/
2:name=systemd:/system.slice/docker-d293e6edbf522628caf322c1d603ddbfbd891c7014e7a747e1bb4bfa122d3b1f.scope

from cadvisor.

vmarmol avatar vmarmol commented on May 7, 2024

Does this affect /, /docker, /docker/, or all?

from cadvisor.

kyurtsever avatar kyurtsever commented on May 7, 2024

Perhaps lmctfy should have configurable job tracking hierarchy and we
should use /systemd hierarchy on systemd machines? Using device or cpu
hierarchy to detect seems somewhat arbitrary?

On Tue, Jun 17, 2014 at 2:39 PM, Victor Marmol [email protected]
wrote:

Does this affect /, /docker, /docker/, or all?


Reply to this email directly or view it on GitHub
#59 (comment).

from cadvisor.

vishh avatar vishh commented on May 7, 2024

+1

On Tue, Jun 17, 2014 at 2:39 PM, Victor Marmol [email protected]
wrote:

Does this affect /, /docker, /docker/, or all?


Reply to this email directly or view it on GitHub
#59 (comment).

from cadvisor.

vmarmol avatar vmarmol commented on May 7, 2024

That may be tricky given freezer support and systemd not using freezer.

from cadvisor.

vishh avatar vishh commented on May 7, 2024

Why can't we change libcontainer as Rohit suggested and not change lmctfy?

On Tue, Jun 17, 2014 at 2:42 PM, Victor Marmol [email protected]
wrote:

That may be tricky given freezer support and systemd not using freezer.


Reply to this email directly or view it on GitHub
#59 (comment).

from cadvisor.

kyurtsever avatar kyurtsever commented on May 7, 2024

Changing libcontainer makes sense but at the moment lmctfy gives us more
detailed statistics so there is benefit for handling this in lmctfy.

On Tue, Jun 17, 2014 at 2:45 PM, Vish Kannan [email protected]
wrote:

Why can't we change libcontainer as Rohit suggested and not change lmctfy?

On Tue, Jun 17, 2014 at 2:42 PM, Victor Marmol [email protected]
wrote:

That may be tricky given freezer support and systemd not using freezer.


Reply to this email directly or view it on GitHub
#59 (comment).


Reply to this email directly or view it on GitHub
#59 (comment).

from cadvisor.

vmarmol avatar vmarmol commented on May 7, 2024

We will need to change both :)

from cadvisor.

rjnagal avatar rjnagal commented on May 7, 2024

/ is fine. Everything else is broken.

libcontainer seems like a simpler change, but I am going to try and change both lmctfy and libcontainer.

One problem with systemd systems is that there are many containers (some of them just within a named systemd hierarchy). We might want to filter some out.

I'd be fine if anyone wants to take over either of the changes :)

from cadvisor.

vmarmol avatar vmarmol commented on May 7, 2024

/ is handled by lmctfy, everything else is handled by libcontainer. So the
libcontainer change should be enough to fix this.

WDYT of ignoring non-Docker and non-root containers in systemd systems? We
should be able to degrade gracefully if that's the case anyways.

On Tue, Jun 17, 2014 at 4:07 PM, Rohit Jnagal [email protected]
wrote:

/ is fine. Everything else is broken.

libcontainer seems like a simpler change, but I am going to try and change
both lmctfy and libcontainer.

One problem with systemd systems is that there are many containers (some
of them just within a named systemd hierarchy). We might want to filter
some out.

I'd be fine if anyone wants to take over either of the changes :)


Reply to this email directly or view it on GitHub
#59 (comment).

from cadvisor.

vmarmol avatar vmarmol commented on May 7, 2024

This is done thanks to the raw driver. We've tested in CoreOS and RHEL. If you find any issues on other systems please file issues :)

from cadvisor.

kabudu avatar kabudu commented on May 7, 2024

@vmarmol Was a patch applied to cadvisor to ignore non-docker and non-root containers in systemd systems? I'm using the latest tag of google/cadvisor available on docker hub with CentOS Linux release 7.2.1511 and still seeing systemd containers appearing in the stats from cadvisor.

from cadvisor.

vishh avatar vishh commented on May 7, 2024

cAdvisor does not ignore any containers as of now.

On Thu, Jan 28, 2016 at 1:23 AM, Kamba Abudu [email protected]
wrote:

@vmarmol https://github.com/vmarmol Was a patch applied to cadvisor to
ignore non-docker and non-root containers in systemd systems? I'm using the
latest tag of google/cadvisor available on docker hub with CentOS Linux
release 7.2.1511 and still seeing systemd containers appearing in the stats
from cadvisor.


Reply to this email directly or view it on GitHub
#59 (comment).

from cadvisor.

andyxning avatar andyxning commented on May 7, 2024

--docker_only=true would filter cgroups to only report docker and root containers.

This is really use to reduce the output from stats/container when used with heapster legacy kubelet source.

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.