memory

package
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package memory tracks the memory usage of the host.

Index

Constants

View Source
const Name = "memory"

Name is the ID of the memory component.

Variables

This section is empty.

Functions

func HasEDACCorrectableErrors added in v0.4.4

func HasEDACCorrectableErrors(line string) bool

func HasOOM added in v0.4.4

func HasOOM(line string) bool

Returns true if the line indicates that the file-max limit has been reached. ref. https://docs.kernel.org/admin-guide/sysctl/fs.html#file-max-file-nr

func HasOOMCgroup added in v0.4.4

func HasOOMCgroup(line string) bool

func HasOOMKillConstraint added in v0.4.4

func HasOOMKillConstraint(line string) bool

func HasOOMKiller added in v0.4.4

func HasOOMKiller(line string) bool

func Match added in v0.4.4

func Match(line string) (eventName string, message string)

func New

func New(ctx context.Context, eventStore eventstore.Store) (components.Component, error)

Types

type Data added in v0.4.5

type Data struct {
	TotalBytes     uint64 `json:"total_bytes"`
	AvailableBytes uint64 `json:"available_bytes"`
	UsedBytes      uint64 `json:"used_bytes"`
	FreeBytes      uint64 `json:"free_bytes"`

	VMAllocTotalBytes uint64 `json:"vm_alloc_total_bytes"`
	VMAllocUsedBytes  uint64 `json:"vm_alloc_used_bytes"`

	// 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"`
	// contains filtered or unexported fields
}

Directories

Path Synopsis
Package metrics implements the memory metrics collection and reporting.
Package metrics implements the memory metrics collection and reporting.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳