Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#815 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@SichenLiang đang làm issue này rồi.

Từ ngày 6/10/2026.

  • #816 của @SichenLiang — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
linux, rust
Lĩnh vực
cli

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Rust
Star
116
Fork
40
Merge trung bình
1 ngày 41 phút
Pull request đã merge (30 ngày)
20

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của uutils/procps

Tất cả issue của uutils/procps

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.