Documentation ¶
Overview ¶
Package memory tracks the memory usage of the host.
Index ¶
Constants ¶
View Source
const ( StateKeyVirtualMemory = "virtual_memory" StateKeyTotalBytes = "total_bytes" StateKeyTotalHumanized = "total_humanized" StateKeyAvailableBytes = "available_bytes" StateKeyAvailableHumanized = "available_humanized" StateKeyUsedBytes = "used_bytes" StateKeyUsedHumanized = "used_humanized" StateKeyUsedPercent = "used_percent" StateKeyFreeBytes = "free_bytes" StateKeyFreeHumanized = "free_humanized" )
View Source
const Name = "memory"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Query query_config.Config `json:"query"`
}
type Output ¶
type Output struct { TotalBytes uint64 `json:"total_bytes"` TotalHumanized string `json:"total_humanized"` AvailableBytes uint64 `json:"available_bytes"` AvailableHumanized string `json:"available_humanized"` UsedBytes uint64 `json:"used_bytes"` UsedHumanized string `json:"used_humanized"` UsedPercent string `json:"used_percent"` FreeBytes uint64 `json:"free_bytes"` FreeHumanized string `json:"free_humanized"` }
func ParseOutputJSON ¶
func ParseStatesToOutput ¶
func ParseStatesToOutput(states ...components.State) (*Output, error)
func (Output) GetUsedPercent ¶
Click to show internal directories.
Click to hide internal directories.