Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

vmstat: -s prints memory in 1000-byte units and leaves SReclaimable out of swap cache

未关闭
#815 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@SichenLiang 已经在做这个了。

开始于 2026年10月6日。

  • #816 来自 @SichenLiang —— 未关闭

评估

难度
3/5
预计耗时
1-2 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
linux, rust
领域
cli

调研方向

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 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

uutils/procps 的其他 Issue

查看 uutils/procps 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。