attacher

package
v0.7.8 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 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
	TaskClockLabel      = config.TaskClock

	// 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                map[string]perfCounter
	HardwareCountersEnabled = true
	BpfPerfArrayPrefix      = "_event_reader"

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

	SoftIRQEvents = []string{config.IRQNetTXLabel, config.IRQNetRXLabel, config.IRQBlockLabel}
)

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 GetEnabledBPFHWCounters added in v0.7.1

func GetEnabledBPFHWCounters() []string

func GetEnabledBPFSWCounters added in v0.7.1

func GetEnabledBPFSWCounters() []string

Types

type ProcessBPFMetrics added in v0.5.2

type ProcessBPFMetrics struct {
	CGroupID       uint64
	ThreadPID      uint64 /* thread id */
	PID            uint64 /* TGID of the threads, i.e. user space pid */
	ProcessRunTime uint64 /* in ms */
	TaskClockTime  uint64 /* in ms */
	CPUCycles      uint64
	CPUInstr       uint64
	CacheMisses    uint64
	PageCacheHit   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