Atoptool / atop

System and process monitor for Linux
GNU General Public License v2.0
789 stars 110 forks source link

fix calculation for scan and steal #245

Closed xixiliguo closed 1 year ago

xixiliguo commented 1 year ago

Higher kernel add new counter like pgscan_anon pgscan_file and pgscan_khugepaged in /proc/vmstat pgscan_kswapd + pgscan_direct + pgscan_khugepaged == pgscan_anon + pgscanfile But all fields which start with "pgscan" is counted in current implement and make it wrong with double value

pgscan_kswapd 130272
pgscan_direct 900
pgscan_khugepaged 0
pgscan_anon 0
pgscan_file 131172

Fix it by only count with pgscan_kswapd, pgscan_direct, pgscan_khugepaged, handle pgsteal with the same method It work well with all exist kernel.