gopsutil
gopsutil copied to clipboard
cpu information not available on windows7 32bit
error: call to NtquerySystemInformation returned 3221225476. err: The operation completed successfully
Error is raised there https://github.com/shirou/gopsutil/blob/e0ec1b9cda4470db704a862282a396986d7e930c/cpu/cpu_windows.go#L175, with cpu.Times(true)
3221225476 is 0xC0000004 which is STATUS_INFO_LENGTH_MISMATCH
, The specified information record length does not match the length that is required for the specified information class..
I will try to reproduce on Tiny7 which is a stripped down 32bit win7, but I'm surprised.
i reproduce it on win32, does anyone know how to handle?
@Lomanic
I could indeed reproduce on Tiny7.
I tried to port https://github.com/spiffe/spire/blob/c2057a4906c5b4bc9796e236e905002183021e50/pkg/agent/plugin/workloadattestor/docker/process/winapi.go#L117 as it (re-)allocates buffer size dynamically instead of setting a really huge one and hope for the best, but this part from that code I don't get for the moment.