Important Change
Starting from this release, VirtualMemoryStat.Used on Linux is now calculated based on MemAvailable in meminfo. This may cause a difference of approximately 6–10% compared to the previous calculation.
To address this, we have introduced an opt-out mechanism. You can disable the new calculation by setting the context key WillBeDeletedOptOutMemAvailableCalc to true. Please note that this option is undocumented and will be removed in six months (Feb. 2026).
For more details, see #1873 and #1882.
What's Changed
cpu
- Do not return an error on unknown CPU stepping by @pgimalac in https://github.com/shirou/gopsutil/pull/1895
- Remove common test helper to skip tests by @rosstimothy in https://github.com/shirou/gopsutil/pull/1894
- feat(cpu): add Neoverse-V2/* other models by @gyuho in https://github.com/shirou/gopsutil/pull/1902
- [cpu][mem][linux]: throw error on Readline failed by @shirou in https://github.com/shirou/gopsutil/pull/1908
disk
- [disk][process][freebsd]: remove binary.go from common by @shirou in https://github.com/shirou/gopsutil/pull/1907
mem
- [mem][linux]: Used calculated from Total and Available by @shirou in https://github.com/shirou/gopsutil/pull/1882
process
- process: Fix data race on darwin by @prashantv in https://github.com/shirou/gopsutil/pull/1901
Other Changes
- chore: enable fatcontext linter by @mmorel-35 in https://github.com/shirou/gopsutil/pull/1885
- chore: enable time-date and time-equal rules from revive by @mmorel-35 in https://github.com/shirou/gopsutil/pull/1891
- Fix: use compatible perfstat version to fix aix cgo builds by @gremat in https://github.com/shirou/gopsutil/pull/1910
New Contributors
- @rosstimothy made their first contribution in https://github.com/shirou/gopsutil/pull/1894
- @prashantv made their first contribution in https://github.com/shirou/gopsutil/pull/1901
- @gyuho made their first contribution in https://github.com/shirou/gopsutil/pull/1902
- @gremat made their first contribution in https://github.com/shirou/gopsutil/pull/1910
Full Changelog: https://github.com/shirou/gopsutil/compare/v4.25.7...v4.25.8