Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#815 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@SichenLiang ci sta già lavorando.

Dal 6/10/2026.

  • #816 di @SichenLiang — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
linux, rust
Ambito
cli

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Rust
Stelle
116
Fork
40
Merge medio
1g 41m
PR unite (30g)
20

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di uutils/procps

Tutte le issue di uutils/procps

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.