loadavg

package module
v0.0.0-...-0aa514f Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2013 License: BSD-2-Clause Imports: 3 Imported by: 0

README

loadavg

simple package for gathering the loadavg from your system

Documentation

Overview

Gather loadavg for various platforms.

Index

Examples

Constants

View Source
const (
	MIN_1 = 0
	MIN_5 = iota
	MIN_15
)

Variables

This section is empty.

Functions

func LoadAvg

func LoadAvg() ([3]float64, error)

LoadAvg returns the traditional 1, 5, and 15 min load averages, i.e. processes that are actually running – averaged over the last 1, 5, and 15 minutes.

Example
loadavg, err := LoadAvg()
if err != nil {
	log.Fatal(err)
}
fmt.Printf("loadavg: %2.2f, %2.2f, %2.2f", loadavg[MIN_1], loadavg[MIN_5],
	loadavg[MIN_15])

Types

This section is empty.

Jump to

Keyboard shortcuts

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