Repository navigation
Releases
v4.26.10
Important
Planned breaking change: disk.IOCounters ReadTime / WriteTime on Windows
This release includes #2164. In a future release, the Windows values of ReadTime and WriteTime will change significantly (seconds to milliseconds). The API will not change.
On Windows, ReadTime and WriteTime are currently in seconds.
On Linux, macOS and FreeBSD they are in milliseconds.
This is a bug (#2160).
- In a future release, the default on Windows will change to milliseconds.
- This will happen when psutil fixes the same bug (giampaolo/psutil#3002), or in February 2027 at the latest.
- After that change, Windows values will be 1000x larger than now.
You can switch to milliseconds now with the new context key disk.WillBeDeletedOptInWindowsIOTimeMs:
ctx := context.WithValue(context.Background(), disk.WillBeDeletedOptInWindowsIOTimeMs, true)
stats, err := disk.IOCountersWithContext(ctx)- Without this key, nothing changes in this release.
- Other platforms ignore this key.
- This key will be removed when milliseconds become the default.
Remove it from your code at that time.
(#2164)
What's Changed
disk
- disk/windows: convert IOCounters Read/WriteTime to milliseconds by @TastyHeadphones in #2164
host
- [host][linux]: fix loginctl users fallback for systemd >= 256 by @houssemexo26 in #2168
- [host][linux]: Fall back to loginctl when utmp is unavailable by @SebastianLeitz in #2132
- [sensors][freebsd]: implement TemperaturesWithContext by @AdamMagued in #2173
mem
process
- process: keep /dev/tty* when /dev/pts is missing by @TastyHeadphones in #2167
New Contributors
- @TastyHeadphones made their first contribution in #2167
- @houssemexo26 made their first contribution in #2168
- @SebastianLeitz made their first contribution in #2132
- @AdamMagued made their first contribution in #2173
Full Changelog: v4.26.9...v4.26.10
v4.26.9
What's Changed
cpu
- [cpu][linux]: expose raw tick counters through ExLinux by @fzlzjerry in #2149
- [cpu][darwin]: don't crash in getFrequency when pmgr lacks voltage-states5-sram by @hsdfat in #2163
docker
- [docker][linux]: support cgroup v2 in Cgroup* functions by @hsdfat in #2143
- [docker][linux]: fix the "all cgroup" case on cgroup v1 by @shirou in #2154
host
- [linux] host: add nixos by @stepbrobd in #2144
mem
net
- net: fix MIB_IF_ROW2 layout on Windows 386 by @zhangli091011 in #2120
- fix(net): include FIFO errors in aggregate I/O counters by @jakezwang in #2153
- [net][linux]: skip ESRCH from /proc//fd in getProcInodesAll by @KobayashiKosuke in #2161
process
- [ci][windows]: run the test suite on windows/386 by @shirou in #2151
- feat(darwin): implement EnvironWithContext for Darwin processes by @nako-ruru in #2135
- Return an error on empty OpenBSD KinfoProc by @AshSgDe29071999 in #2142
Other Changes
- Bump perfstat to fix memory leaks by @pgimalac in #2148
- [common]: use reflect.Pointer instead of the deprecated reflect.Ptr by @shirou in #2156
New Contributors
- @nako-ruru made their first contribution in #2135
- @AshSgDe29071999 made their first contribution in #2142
- @stepbrobd made their first contribution in #2144
- @zhangli091011 made their first contribution in #2120
- @hsdfat made their first contribution in #2143
- @fzlzjerry made their first contribution in #2149
- @jakezwang made their first contribution in #2153
- @KobayashiKosuke made their first contribution in #2161
Full Changelog: v4.26.8...v4.26.9
v4.26.8
What's Changed
cpu
disk
net
- fix(net): handle short Darwin netstat output by @alexfalkowski in #2116
process
- Closes #2126 Implement NtQueryInformationProcess to get commandline Windows 8.1+ by @Ahm3dRN in #2127
Other Changes
New Contributors
- @alexfalkowski made their first contribution in #2116
- @neilpang made their first contribution in #2129
- @Ahm3dRN made their first contribution in #2127
Full Changelog: v4.26.7...v4.26.8
v4.26.7
What's Changed
cpu
- fix: harden parsers against malformed/truncated input by @shirou in #2109
- [cpu][windows]: compute cpu-total times from integer ticks by @skartikey in #2111
- [darwin][process]: fix errno handling and library lifetime on darwin by @shirou in #2119
- [cpu][windows]: compute total counters from individual stats to handle processor groups correctly by @srebhan in #2125
- [cpu][windows]: harden the cpu-total computation added in #2125 by @shirou in #2128
net
- fix(net): pad GetExtendedTcpTable buffer to prevent GC thrashing on Windows by @HarshalPatel1972 in #2108
process
other
New Contributors
Full Changelog: v4.26.6...v4.26.7
v4.26.6
What's Changed
cpu
disk
mem
- [mem]: fix OpenBSD virtual memory on -current by @atanas-vladimirov in #2104
sensor
New Contributors
- @drutsan made their first contribution in #2084
- @guillemj made their first contribution in #2103
- @atanas-vladimirov made their first contribution in #2104
Full Changelog: v4.26.5...v4.26.6
v4.26.5
What's Changed
disk
- disk: report effective mount mode on Linux by @paulojmdias in #2085
net
process
- [process]: fix envp leak into Cmdline on darwin by @kerlenton in #2092
- perf(process): build snapshot map once on Windows to fix O(N²) process listing by @HarshalPatel1972 in #2062
New Contributors
- @paulojmdias made their first contribution in #2085
- @HarshalPatel1972 made their first contribution in #2062
Full Changelog: v4.26.4...v4.26.5
v4.26.4
What's Changed
cpu
- [cpu][windows]: fix percpu stats on Windows hosts with multiple processor groups by @shirou in #2081
disk
- Fix infinite loop when failed to find path for volume on Windows by @woct0rdho in #2066
host
- host: add testInvoker dependency injection for AIX by @Dylan-M in #2040
- Use getconf instead of bootinfo on AIX to get kernel architecture by @pgimalac in #2079
load
mem
- Fix NetBSD mem / net stats by @fraggerfox in #2077
net
- net: populate BytesSent/BytesRecv via entstat on AIX nocgo by @Dylan-M in #2034
- fix: add bounds check for /proc/net/dev fields to prevent panic by @Yanhu007 in #2075
- net: add parseEntstat and parseNetstatI unit tests with AIX fixtures by @Dylan-M in #2073
- Implement net ProtoCounters for AIX by @pgimalac in #2083
process
- fix: add bounds check for /proc/[pid]/stat fields in fillFromTIDStat by @Yanhu007 in #2076
- [process][linux]: use TrimSuffix instead of Trim by @shirou in #2068
New Contributors
- @woct0rdho made their first contribution in #2066
- @Yanhu007 made their first contribution in #2075
- @fraggerfox made their first contribution in #2077
Full Changelog: v4.26.3...v4.26.4
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