loadinfo

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2019 License: Apache-2.0 Imports: 8 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 StartBackgroundLogger

func StartBackgroundLogger()

StartBackgroundLogger starts background logging

Types

type CloseChan

type CloseChan chan struct{}

CloseChan is the channel to close to stop periodic system load logging

func LogPeriodicSystemLoad

func LogPeriodicSystemLoad(logFunc LogFunc, interval time.Duration) CloseChan

LogPeriodicSystemLoad logs the system load in the interval specified until the channel is closed

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