profile
viewpoint

Alexbyy/algorithm 0

平时练习的算法仓库

Alexbyy/algs4 0

Algorithms, 4th edition textbook code and libraries

Alexbyy/axios-tutorial 0

axios实例应用及源码剖析 - xhr篇 (走心教程)

Alexbyy/blog 0

这是一个基于koa2搭建的博客服务

Alexbyy/blog-front 0

博客前端代码库

Alexbyy/deeplearning-assignment 0

吴恩达-深度学习-课后作业-答案与总结

Alexbyy/Go42 0

《Go语言四十二章经》详细讲述Go语言规范与语法细节及开发中常见的误区,通过研读标准库等经典代码设计模式,启发读者深刻理解Go语言的核心思维,进入Go语言开发的更高阶段。

Alexbyy/jsonp 0

A simple JSONP implementation

Alexbyy/mostly-adequate-guide 0

Mostly adequate guide to FP (in javascript)

fork Alexbyy/Go42

《Go语言四十二章经》详细讲述Go语言规范与语法细节及开发中常见的误区,通过研读标准库等经典代码设计模式,启发读者深刻理解Go语言的核心思维,进入Go语言开发的更高阶段。

fork in 2 months

startedffhelicopter/Go42

started time in 2 months

fork Alexbyy/telegraf

The plugin-driven server agent for collecting & reporting metrics.

fork in 2 months

issue commentgoogle/cadvisor

cadvisor collects lots of unneed systemd cgroups stats

It will collect those by default, even if you don't set them. But it shouldn't collect random /system.slice/* cgroups unless you set something additional

ok,I see,Thank you very much!

Alexbyy

comment created time in 2 months

issue commentgoogle/cadvisor

cadvisor collects lots of unneed systemd cgroups stats

That looks like the version of your kubectl binary. The version of the kubelet is what matters. Check kubectl get no

Is that a bug or it will collect '/system.slice/docker.service' and '/system.slice/kubelet.service' by default,even though I don't set any of those?

Alexbyy

comment created time in 2 months

issue commentgoogle/cadvisor

cadvisor collects lots of unneed systemd cgroups stats

That looks like the version of your kubectl binary. The version of the kubelet is what matters. Check kubectl get no That shows the version is also v1.18.6. image

Alexbyy

comment created time in 2 months

issue commentgoogle/cadvisor

cadvisor collects lots of unneed systemd cgroups stats

Looks like you are still on 1.14 based on the initial comment, so you will probably still have all metrics.

I don't think so.because the last comment is based on 1.18,not 1.14.This is my k8s version info.

image

Alexbyy

comment created time in 2 months

issue commentgoogle/cadvisor

cadvisor collects lots of unneed systemd cgroups stats

The behavior looks like it is: If you don't set any of those, and cgroups-per-qos is true (which is the default IIRC), we only monitor cgroups inside /kubepods. If you set --kubelet-cgroups, we also monitor cgroups within that cgroup. If you set --system-cgroups, we also monitor cgroups within that cgroup.

Thank you very much. I don't set any of those,and cgroups-per-qos is true,when I curl the cadvisor's port,I got this, as you can see there is not only /kubepods,but also has "id="/system.slice/docker.service""、“id="/system.slice/docker.service" etc.Is that a normal result? my k8s is v1.18.6

image This is my kubelete config: image

Alexbyy

comment created time in 2 months

issue commentgoogle/cadvisor

cadvisor collects lots of unneed systemd cgroups stats

Since 1.15, we only collect metrics required by the summary API: https://github.com/kubernetes/kubernetes/blob/master/cmd/kubelet/app/server.go#L604. So you should be able to use KubeletCgroups, RuntimeCgroups, and SystemCgroups to determine which cgroup subtrees are collected.

Hi dashpole, Does that mean that I can use the flags of "--system-cgroups"、"--kubelet-cgroups" to determine which cgroup subtrees are collected? and if I don't specify any of these flags,Could you tell me what does cadvisor collect by default?Many Thanks!

Alexbyy

comment created time in 2 months

issue commentgoogle/cadvisor

cadvisor collects lots of unneed systemd cgroups stats

Since 1.15, we only collect metrics required by the summary API: https://github.com/kubernetes/kubernetes/blob/master/cmd/kubelet/app/server.go#L604. So you should be able to use KubeletCgroups, RuntimeCgroups, and SystemCgroups to determine which cgroup subtrees are collected.

Thanks for your reply.I will have a try.

Alexbyy

comment created time in 2 months

issue openedgoogle/cadvisor

cadvisor collects lots of unneed systemd cgroups stats

image my cadvisor collects a lot of unneeded metrics,these metrics don't have a label of container_name or pod_name, and I don't want cadvisor collects these metrics. Is there any way to make the cadvisor only collect metrics which has labels of container_name and pod_name?

This is my k8s version: Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.3", GitCommit:"5e53fd6bc17c0dec8434817e69b04a25d8ae0ff0", GitTreeState:"archive", BuildDate:"1970-01-01T00:00:00Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.3", GitCommit:"$Format:%H$", GitTreeState:"archive", BuildDate:"1970-01-01T00:00:00Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}

created time in 2 months

issue commentgo-yaml/yaml

How can I preserve the original format?

https://play.golang.org/p/L_V8Zhx2Auc Thank you very much! I find when I use Backticks such as some words rather than Double quotes such as "some word",the output will mess up. And when I put a "\n" in a string,the output will also mess up,For example,when I use "some \n words" rather than "some words",the out put will mess up. I expect to insert a format string.Would you tell me how to solve this problem?

Alexbyy

comment created time in 3 months

issue openedgo-yaml/yaml

How can I preserve the original format?

I use yaml.Unmarshal to Unmarshal a file. image

image

The file is as follows: image

Then I change the struct

image

Then I use Marshal to reverse it: image

The output is as follows: image the output is Completely messed up,Who can tell me How can I preserve the original format? I expect the output looks like that: image Many thanks!

created time in 3 months

more