Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SwapMemoryStat ¶
type SwapMemoryStat struct { Total uint64 `json:"total"` Used uint64 `json:"used"` Free uint64 `json:"free"` UsedPercent float64 `json:"usedPercent"` Sin uint64 `json:"sin"` Sout uint64 `json:"sout"` }
func (SwapMemoryStat) String ¶
func (m SwapMemoryStat) String() string
type VirtualMemoryStat ¶
type VirtualMemoryStat struct { // Total amount of RAM on this system Total uint64 `json:"total"` // RAM available for programs to allocate // // This value is computed from the kernel specific values. Available uint64 `json:"available"` // RAM used by programs // // This value is computed from the kernel specific values. Used uint64 `json:"used"` // Percentage of RAM used by programs // // This value is computed from the kernel specific values. UsedPercent float64 `json:"usedPercent"` Free uint64 `json:"free"` Active uint64 `json:"active"` Inactive uint64 `json:"inactive"` Wired uint64 `json:"wired"` Buffers uint64 `json:"buffers"` Cached uint64 `json:"cached"` Writeback uint64 `json:"writeback"` Dirty uint64 `json:"dirty"` WritebackTmp uint64 `json:"writebacktmp"` Slab uint64 `json:"slab"` PageTables uint64 `json:"pagetables"` SwapCached uint64 `json:"swapcached"` CommitLimit uint64 `json:"commitlimit"` CommittedAS uint64 `json:"committedas"` }
Memory usage statistics. Total, Available and Used contain numbers of bytes for human consumption.
The other fields in this struct contain kernel specific values.
func VirtualMemory ¶
func VirtualMemory() (*VirtualMemoryStat, error)
func VirtualMemoryWithContext ¶
func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, error)
func (VirtualMemoryStat) String ¶
func (m VirtualMemoryStat) String() string
Click to show internal directories.
Click to hide internal directories.