Repository navigation
fix: 首个上报量一秒基线,虚拟化类型按 CPUID 与容器痕迹识别 - #13
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
首个上报不再是 0,虚拟化类型同一种只有一个名字,顺带清理与实现不符的注释和无用代码。不改协议,新旧 hub 照常配对。
cpu 0 / net 0(--interval 60时实时视图挂一分钟的 0,历史每次重启多一个 CPU 为 0 的点),重连后的首报则是整段断线期间的平均值/proc/vz存在且没有/proc/bc(宿主两个都有);systemd 写的/run/systemd/container;/.dockerenv、/run/.containerenv;挂在/proc/*上的 LXCFS(Proxmox CT、LXD,包括不跑 systemd 的 Alpine)。此前 LXC 一律报成宿主的类型KVM、QEMU、Bochs、Alibaba Cloud ECS等写法,此前据此报出 kvm / qemu / bochs / vm 几种systemd-detect-virt一致,只把 microsoft 写作 hyper-v、oracle 写作 virtualbox(免得读成甲骨文云)、amazon / google 写作 kvmos-release按规范在/etc缺失时读/usr/lib/os-release,值可用单引号Facts、Metrics、PingTask上用不到的 derive测试:新增
a_container_is_named_from_what_an_unprivileged_process_can_read(构造目录,含 OpenVZ 与 LXCFS 两种宿主)和virtualization_agrees_with_systemd_detect_virt(真机比对);变异检查逐条变红。hub 1.3.2 端到端通过,--interval 60首报实测由cpu 0 / net_rx 0变为cpu 58.6 / net_rx 21370。