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

            Source Files