Documentation
¶
Rendered for windows/amd64
Overview ¶
Package winmem provides memory usage metrics for Windows
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PageFileCallback ¶
Types ¶
type PageFilesContext ¶
type PageFilesContext struct {
PageFiles []*PagingFileStat
PageSize uint64
}
PageFilesContext is a context for the EnumPageFilesW function
type PagefileStat ¶
type PagefileStat struct {
// The current committed memory limit for the system or
// the current process, whichever is smaller, in bytes
Total uint64
// 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.
Available uint64
// Used is Total - Available
Used uint64
// UsedPercent is used as a percentage of the total pagefile
UsedPercent float64
}
PagefileStat contains basic metrics for the windows pagefile
func PagefileMemory ¶
func PagefileMemory() (*PagefileStat, error)
PagefileMemory returns paging (swap) file metrics
type PagingFileStat ¶
type PagingFileStat struct {
// The name of the paging file
Name string
// The total size of the paging file
Total uint64
// The amount of paging file that is available for use
Available uint64
// The amount of paging file that is used
Used uint64
// The percentage of paging file that is used
UsedPercent float64
}
PagingFileStat contains statistics for paging files
func EnumPageFilesW ¶
func EnumPageFilesW(pageSize uint64) ([]*PagingFileStat, error)
EnumPageFilesW enumerates page files
https://learn.microsoft.com/en-us/windows/win32/api/psapi/nf-psapi-enumpagefilesw
func PagingFileMemory ¶
func PagingFileMemory() ([]*PagingFileStat, error)
PagingFileMemory returns paging file metrics
type SwapMemoryStat ¶
SwapMemoryStat contains swap statistics
type VirtualMemoryStat ¶
type VirtualMemoryStat struct {
// Total amount of RAM on this system
Total uint64
// RAM available for programs to allocate
//
// This value is computed from the kernel specific values.
Available uint64
// RAM used by programs
//
// This value is computed from the kernel specific values.
Used uint64
// Percentage of RAM used by programs
//
// This value is computed from the kernel specific values.
UsedPercent float64
}
VirtualMemoryStat contains basic metrics for virtual memory
func VirtualMemory ¶
func VirtualMemory() (*VirtualMemoryStat, error)
VirtualMemory returns virtual memory metrics for the machine
Click to show internal directories.
Click to hide internal directories.