attacher

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CPUCycleLabel       = config.CPUCycle
	CPURefCycleLabel    = config.CPURefCycle
	CPUInstructionLabel = config.CPUInstruction
	CacheMissLabel      = config.CacheMiss

	// IRQ vector to IRQ number
	IRQNetTX = 2
	IRQNetRX = 3
	IRQBlock = 4
)
View Source
const (
	TableProcessName = "processes"
	TableCPUFreqName = "cpu_freq_array"
	MapSize          = 10240
	CPUNumSize       = 128
)
View Source
const (
	BccBuilt = false
)
View Source
const (
	LibbpfBuilt = false
)

Variables

View Source
var (
	Counters                = getCounters()
	HardwareCountersEnabled = true
	BpfPerfArrayPrefix      = "_hc_reader"

	PerfEvents = map[string][]int{}
	ByteOrder  binary.ByteOrder
)

Functions

func Attach added in v0.5.2

func Attach() (interface{}, error)

func CollectCPUFreq added in v0.5.2

func CollectCPUFreq() (cpuFreqData map[int32]uint64, err error)

func Detach added in v0.5.2

func Detach()

func GetEnabledBPFCounters

func GetEnabledBPFCounters() []string

func GetEnabledHWCounters

func GetEnabledHWCounters() []string

Types

type ProcessBPFMetrics added in v0.5.2

type ProcessBPFMetrics struct {
	CGroupID       uint64
	PID            uint64
	ProcessRunTime uint64
	CPUCycles      uint64
	CPUInstr       uint64
	CacheMisses    uint64
	VecNR          [config.MaxIRQ]uint16 // irq counter, 10 is the max number of irq vectors
	Command        [16]byte
}

must be in sync with bpf program

func CollectProcesses added in v0.5.2

func CollectProcesses() (processesData []ProcessBPFMetrics, err error)

Jump to

Keyboard shortcuts

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