perfmon

package
v0.0.0-...-5d04527 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const CPU_LIMIT = 20.0
View Source
const MEM_LIMIT = 1024 * 50
View Source
const OVERLAOD_LIMIT = 3

Variables

This section is empty.

Functions

func GetAgentCpuLoadWithTop

func GetAgentCpuLoadWithTop(times int) (error, float64)

func InitCgroup

func InitCgroup() error

func StartPerfmon

func StartPerfmon(pid int, interval uint, callback PerfCallback) *procStat

func StartSelfKillMon

func StartSelfKillMon()

func StopSelfKillMon

func StopSelfKillMon()

Types

type PerfCallback

type PerfCallback func(cpusage float64, memoryInKbs uint64, threads uint64)

Jump to

Keyboard shortcuts

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