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" StateKeyVMAllocTotalBytes = "vm_alloc_total_bytes" StateKeyVMAllocTotalHumanized = "vm_alloc_total_humanized" StateKeyVMAllocUsedBytes = "vm_alloc_used_bytes" StateKeyVMAllocUsedHumanized = "vm_alloc_used_humanized" StateKeyVMAllocUsedPercent = "vm_alloc_used_percent" StateKeyBPFJITBufferBytes = "bpf_jit_buffer_bytes" StateKeyBPFJITBufferHumanized = "bpf_jit_buffer_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"` VMAllocTotalBytes uint64 `json:"vm_alloc_total_bytes"` VMAllocTotalHumanized string `json:"vm_alloc_total_humanized"` VMAllocUsedBytes uint64 `json:"vm_alloc_used_bytes"` VMAllocUsedHumanized string `json:"vm_alloc_used_humanized"` VMAllocUsedPercent string `json:"vm_alloc_used_percent"` // Represents the current BPF JIT buffer size in bytes. // ref. "cat /proc/vmallocinfo | grep bpf_jit | awk '{s+=$2} END {print s}'" BPFJITBufferBytes uint64 `json:"bpf_jit_buffer_bytes"` BPFJITBufferHumanized string `json:"bpf_jit_buffer_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.