Releases: shirou/gopsutil
v4.26.3
Important Notice
The temporary opt-out option WillBeDeletedOptOutMemAvailableCalc, introduced in v4.25.8, has been removed in this release.
Code that relied on this option may fail to build. If so, please update your code to work with the current VirtualMemoryStat.Used calculation, as the opt-out mechanism is no longer available.
What's Changed
cpu
- Use total stats for AIX CPU times by @pgimalac in #2014
- Use provided description for CPU model name on AIX by @pgimalac in #2015
- Fix logical cpu in CountsWithContext for AIX by @pgimalac in #2017
- Fix SIGBUS/SIGSEGV crash in TemperaturesWithContext on macOS ARM64 by @lubeschanin in #2063
disk
- Fix PartitionsWithContext on AIX to avoid returning empty structs by @pgimalac in #2013
- Implement IOCountersWithContext for AIX with CGO by @pgimalac in #2016
- disk: fix UsageWithContext unit conversions on AIX nocgo by @Dylan-M in #2032
- disk: implement IOCountersWithContext for AIX nocgo via iostat by @Dylan-M in #2033
host
- Fix host user parsing on AIX by @pgimalac in #2021
- Add implementation of numProcs for AIX with cgo by @pgimalac in #2022
load
mem
- mem: populate Cached from bcachestats on OpenBSD by @skartikey in #2029
- [mem][linux]: Remove deprecated opt-out for MemAvailable-based Used by @shirou in #2012
net
- Fix AIX net iocounters error fields and add dropin field by @pgimalac in #2020
- Fix netstat drop column parsing when address is empty on darwin by @pgimalac in #2025
- [net][linux]: prevent incorrect deduplication of unnamed UNIX sockets by @shirou in #2031
process
- Fix golangci-lint linter jobs by @pgimalac in #2018
- Fix effective gid on darwin by @pgimalac in #2023
- Do not set swap field to an incorrect value on darwin by @pgimalac in #2027
sensors
- Fix macos sensor data type field by @pgimalac in #2026
- sensors(aix): remove orphaned VirtualizationWithContext by @Dylan-M in #2011
New Contributors
- @lubeschanin made their first contribution in #2063
Full Changelog: v4.26.2...v4.26.3
v4.26.2
What's Changed
disk
- [disk][linux]: fix Device set to "none" for virtual filesystems by @skartikey in #2002
- fix(disk): skip drives returning ERROR_INVALID_FUNCTION or ERROR_NOT_SUPPORTED in IOCounters on Windows by @jose-manuel-almaza in #2003
- [linux][disk]: fix disk mountinfo parsing bug by @shirou in #2007
host
process
Other Changes
- [doc]: Update 'golang' to 'Go' for consistency by @alexandear in #1993
New Contributors
- @alexandear made their first contribution in #1993
- @jose-manuel-almaza made their first contribution in #2003
Full Changelog: v4.26.1...v4.26.2
v4.26.1
What's Changed
disk
host
- [host][darwin]: fix utmpx database parsing by @uubulb in #1990
- feat: Add AIX platform support to common package with uptime and boot time functions by @Dylan-M in #1979
mem
process
- Fix windows open files with context by @ebriney in #1991
- Return an error on reading empty proc pid stat file by @pgimalac in #1995
- [process][posix]: fix getTerminalMap path construction bug by @shirou in #1994
sensor
New Contributors
Full Changelog: v4.25.12...v4.26.1
v4.25.12
What's Changed
cpu
- [cpu][linux]: fix ":" in CPU ModelName by @shirou in #1960
- [cpu][linux]: add riscv cpu parser by @mengzhuo in #1970
- [cpu][darwin]: release pCoreRef in each iteration by @uubulb in #1971
- [darwin]: wrap library functions as struct methods by @uubulb in #1976
disk
- Fixes #1284 by @johnnybubonic in #1931
- fix disk.Partition cut off after first disk by @sni in #1975
- [disk][windows]: add virtual drive for TestGetLogicalDrives by @shirou in #1977
- Add missing mount flags (local, protect) by @kerlenton in #1968
host
mem
process
- Add NumFDs implementation for Darwin by @kerlenton in #1965
- [sensors][darwin]: retrieve sensor information in one function call by @uubulb in #1973
New Contributors
- @kerlenton made their first contribution in #1965
- @sni made their first contribution in #1975
- @pvlltvk made their first contribution in #1972
- @mengzhuo made their first contribution in #1970
Full Changelog: v4.25.11...v4.25.12
v4.25.11
What's Changed
cpu
- chore: enable nilnesserr linter by @mmorel-35 in #1893
disk
- add context cancellation to disk windows by @StefanoBalzarottiNozomi in #1943
process
- Fix potential edge case on procfs and alike by @johnnybubonic in #1934
- fix(process): add missing CloseHandle to OpenFilesWithContext for Windows by @OverOrion in #1955
Other Changes
New Contributors
- @johnnybubonic made their first contribution in #1934
- @OverOrion made their first contribution in #1955
Full Changelog: v4.25.10...v4.25.11
v4.25.10
What's Changed
cpu
- chore: enable noctx linter by @mmorel-35 in #1930
- Use registry to remove wmi from cpu package by @OrbintSoft in #1929
disk
- Remove leaking goroutine by @StefanoBalzarottiNozomi in #1921
- use correct path lengths by @StefanoBalzarottiNozomi in #1937
- refactor disk windows and add tests by @StefanoBalzarottiNozomi in #1941
host
net
Other Changes
New Contributors
Full Changelog: v4.25.9...v4.25.10
v4.25.9
What's Changed
cpu
- get max Mhz per package without wmi by @OrbintSoft in #1919
- [cpu][windows]: add logical processor count error handling by @shirou in #1925
- Family and PhysicalID without wmi by @OrbintSoft in #1926
- Cores count without wmi by @OrbintSoft in #1915
disk
- [disk][linux]: fix lint (gofumpt) by @shirou in #1928
- fix infinite loop by @StefanoBalzarottiNozomi in #1922
process
Other Changes
- fix: github action labeler.yml confirugration format by @shirou in #1918
- limit memory usage on warnings list by @StefanoBalzarottiNozomi in #1920
New Contributors
- @wmypku made their first contribution in #1906
- @StefanoBalzarottiNozomi made their first contribution in #1920
Full Changelog: v4.25.8...v4.25.9
v4.25.8
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 #1895
- Remove common test helper to skip tests by @rosstimothy in #1894
- feat(cpu): add Neoverse-V2/* other models by @gyuho in #1902
- [cpu][mem][linux]: throw error on Readline failed by @shirou in #1908
disk
mem
process
- process: Fix data race on darwin by @prashantv in #1901
Other Changes
- chore: enable fatcontext linter by @mmorel-35 in #1885
- chore: enable time-date and time-equal rules from revive by @mmorel-35 in #1891
- Fix: use compatible perfstat version to fix aix cgo builds by @gremat in #1910
New Contributors
- @rosstimothy made their first contribution in #1894
- @prashantv made their first contribution in #1901
- @gyuho made their first contribution in #1902
- @gremat made their first contribution in #1910
Full Changelog: v4.25.7...v4.25.8
v4.25.7
What's Changed
disk
- fix(disk): handle NVMe controller notation in IOCounters on Linux by @skartikey in #1878
mem
process
Other Changes
- chore: enable unused-receiver from revive by @mmorel-35 in #1883
- enable shadow from govet by @mmorel-35 in #1863
- fix: windows-2019 runner image has been deprecated by @shirou in #1881
New Contributors
- @martoche made their first contribution in #1872
- @halaney made their first contribution in #1887
- @skartikey made their first contribution in #1878
Full Changelog: v4.25.6...v4.25.7
v4.25.6
What's Changed
disk
- [disk][linux]: fix parsing mount option when use 1/mounts on Partition by @shirou in #1861
- Fetch stats from folder mounted volumes by @dloucasfx in #1534
mem
process
Other Changes
- chore: fix some minor issues in the comments by @shandongzhejiang in #1870
- enable all go-critic by @mmorel-35 in #1856
- fix: relace golangcilint on var-naming for package name by @shirou in #1871
New Contributors
- @dloucasfx made their first contribution in #1534
- @shandongzhejiang made their first contribution in #1870
- @kruskall made their first contribution in #1868
Full Changelog: v4.25.5...v4.25.6