loadinfo

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package loadinfo provides the ability to log system load information either at a particular time or periodically in the background

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogCurrentSystemLoad

func LogCurrentSystemLoad(logFunc LogFunc)

LogCurrentSystemLoad logs the current system load and lists all processes consuming more than cpuWatermark of the CPU

func LogPeriodicSystemLoad

func LogPeriodicSystemLoad(ctx context.Context, logFunc LogFunc, interval time.Duration)

LogPeriodicSystemLoad logs the system load in the interval specified until the given ctx is canceled.

func StartBackgroundLogger

func StartBackgroundLogger()

StartBackgroundLogger starts background logging

Types

type LogFunc

type LogFunc func(format string, args ...interface{})

LogFunc is the function to used to log the system load

Jump to

Keyboard shortcuts

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