You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And the documentation for MemoryStatusEx says that we should be using GetPerformanceInfo instead.
ullTotalPageFile
The current committed memory limit for the system or the current process, whichever is smaller, in bytes. To get the system-wide committed memory limit, call GetPerformanceInfo.
ullAvailPageFile
The maximum amount of memory the current process can commit, in bytes. This value is equal to or smaller than the system-wide available commit value. To calculate the system-wide available commit value, call GetPerformanceInfo and subtract the value of CommitTotal from the value of CommitLimit.
This can lead to Metricbeat showing an incorrect amount of swap, especially when swap is configured to be very small or zero.
The text was updated successfully, but these errors were encountered:
currently the windows memory module uses GlobalMemoryStatusEx to get the swap Total, Used & FreeBytes.
elastic-agent-system-metrics/metric/memory/memory_windows.go
Lines 33 to 49 in 5c1fcf2
But GlobalMemoryStatusEx is really a syscall of procGlobalMemoryStatusEx which ends up being
procGlobalMemoryStatusEx = modkernel32.NewProc("GlobalMemoryStatusEx")
And the documentation for MemoryStatusEx says that we should be using GetPerformanceInfo instead.
ullTotalPageFile
The current committed memory limit for the system or the current process, whichever is smaller, in bytes. To get the system-wide committed memory limit, call GetPerformanceInfo.
ullAvailPageFile
The maximum amount of memory the current process can commit, in bytes. This value is equal to or smaller than the system-wide available commit value. To calculate the system-wide available commit value, call GetPerformanceInfo and subtract the value of CommitTotal from the value of CommitLimit.
This can lead to Metricbeat showing an incorrect amount of swap, especially when swap is configured to be very small or zero.
The text was updated successfully, but these errors were encountered: