vmstat: -s prints memory in 1000-byte units and leaves SReclaimable out of swap cache
维护者通常 1 天内回复
评估
调研方向
Read the vmstat -s implementation and its tests, then compare the memory-unit and swap-cache calculations with the /proc/meminfo examples in the issue. Verify the output against procps-ng, including the supplied Cached and SReclaimable values; done means the reported totals and swap cache match those reference values.
由索引模型根据 Issue 内容生成。
描述
vmstat -s prints its K memory lines in units of 1000 bytes, while procps-ng prints the KiB values from /proc/meminfo. Every memory line is scaled up by about 2.4%, which shows on any Linux system:
$ grep MemTotal /proc/meminfo
MemTotal: 15634224 kB
$ vmstat -s | head -1
16009445 K total memory
procps-ng 4.0.7 prints 15634224 K total memory.
The swap cache line also differs: procps-ng counts Cached plus SReclaimable, uutils counts only Cached. With a fixed /proc/meminfo where Cached is 4576180 kB and SReclaimable is 4968264 kB, procps-ng prints 9544444 K swap cache and uutils prints 4686008.
#668 changed how meminfo values are parsed, and #655 added SReclaimable to the cache column of the default output, but neither changed -s. This came up in #814.
- 主要语言
- Rust
- 星标
- 117
- 派生
- 42
- 平均合并
- 15 小时 38 分钟
- 30 天内合并 PR
- 8
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
uutils/procps 的其他 Issue
-
hugetop: print human readable sizes by default可能重新可做 关联的 PR 已关闭且未合并。 未关闭hugetop
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
w: exits with error when utmp session references a missing tty device可能已有人在做 @Franklin-Qi 于 131 天前认领。 未关闭w
难度 3/5 1-2 天 新手友好度 72/100
uutils/procps#718 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 52/100
维护者通常 1 天内回复
-
enhancement good first issue
难度 4/5 3-5 天 新手友好度 45/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
维护者通常 1 天内回复
相似的 Issue
-
area/tools bug session-analysis
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 84/100
nix-community/fenix#262 ·
-
bug
难度 2/5 1-3 小时 新手友好度 67/100
GabrieleLozupone/kokon#41 ·
维护者通常 1 天内回复
-
Small glitch未关闭priority: medium
难度 2/5 1-3 小时 新手友好度 66/100
storytold/photocraft#9538 ·
维护者通常 1 天内回复
-
bug P2 rust
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复