mem

package
v1.0.27 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2025 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryStats

type MemoryStats struct {
	Total     uint64 `json:"total"`      // the total accessible system memory in bytes.
	Free      uint64 `json:"free"`       // the total free system memory in bytes.
	Shared    uint64 `json:"shared"`     // the total shared system memory in bytes.
	Buffer    uint64 `json:"buffer"`     // the total buffer system memory in bytes.
	Cached    uint64 `json:"cached"`     // the total cached system memory in bytes.
	SwapTotal uint64 `json:"swap_total"` // the total swap memory in bytes.
	SwapFree  uint64 `json:"swap_free"`  // the total free swap memory in bytes.
}

func GetMemoryStats

func GetMemoryStats() (ms MemoryStats, err error)

func (*MemoryStats) Available

func (ms *MemoryStats) Available() uint64

func (*MemoryStats) String

func (ms *MemoryStats) String() string

func (*MemoryStats) SwapUsed

func (ms *MemoryStats) SwapUsed() uint64

func (*MemoryStats) Usage

func (ms *MemoryStats) Usage() float64

func (*MemoryStats) Used

func (ms *MemoryStats) Used() uint64

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL