Index | Files

package cpuload

import ""

Package cpuload implements an i3bar module that shows load averages. Deprecated in favour of SysInfo, which can show more than just load average.


Package Files


type LoadAvg Uses

type LoadAvg [3]float64

LoadAvg represents the CPU load average for the past 1, 5, and 15 minutes.

func (LoadAvg) Min1 Uses

func (l LoadAvg) Min1() float64

Min1 returns the CPU load average for the past 1 minute.

func (LoadAvg) Min15 Uses

func (l LoadAvg) Min15() float64

Min15 returns the CPU load average for the past 15 minutes.

func (LoadAvg) Min5 Uses

func (l LoadAvg) Min5() float64

Min5 returns the CPU load average for the past 5 minutes.

type Module Uses

type Module struct {
    // contains filtered or unexported fields

Module represents a cpuload bar module. It supports setting the output format, click handler, update frequency, and urgency/colour functions.

func New Uses

func New() *Module

New constructs an instance of the cpuload module.

func (*Module) Output Uses

func (m *Module) Output(outputFunc func(LoadAvg) bar.Output) *Module

Output configures a module to display the output of a user-defined function.

func (*Module) RefreshInterval Uses

func (m *Module) RefreshInterval(interval time.Duration) *Module

RefreshInterval configures the polling frequency for getloadavg.

func (*Module) Stream Uses

func (m *Module) Stream(s bar.Sink)

Stream starts the module.

Package cpuload imports 8 packages (graph). Updated 2018-11-25. Refresh now. Tools for package owners.