system

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 27, 2014 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Copyright (c) 2014, Percona LLC and/or its affiliates. All rights reserved.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>

Index

Constants

This section is empty.

Variables

View Source
var CPUStates []string = []string{"user", "nice", "system", "idle", "iowait", "irq", "softirq", "steal", "guest", "guestlow"}

Keep CPUStates and nCPUStates in sync, else Go will panic accessing index out of range.

Functions

func StrToFloat

func StrToFloat(s string) float64

Types

type Config

type Config struct {
	mm.Config
}

type Monitor

type Monitor struct {
	// contains filtered or unexported fields
}

func NewMonitor

func NewMonitor(name string, config *Config, logger *pct.Logger) *Monitor

func (*Monitor) Config

func (m *Monitor) Config() interface{}

@goroutine[0]

func (*Monitor) ProcDiskstats

func (m *Monitor) ProcDiskstats(content []byte) ([]mm.Metric, error)

func (*Monitor) ProcLoadavg

func (m *Monitor) ProcLoadavg(content []byte) ([]mm.Metric, error)

func (*Monitor) ProcMeminfo

func (m *Monitor) ProcMeminfo(content []byte) ([]mm.Metric, error)

func (*Monitor) ProcStat

func (m *Monitor) ProcStat(content []byte) ([]mm.Metric, error)

func (*Monitor) ProcVmstat

func (m *Monitor) ProcVmstat(content []byte) ([]mm.Metric, error)

func (*Monitor) Start

func (m *Monitor) Start(tickChan chan time.Time, collectionChan chan *mm.Collection) error

@goroutine[0]

func (*Monitor) Status

func (m *Monitor) Status() map[string]string

@goroutine[0]

func (*Monitor) Stop

func (m *Monitor) Stop() error

@goroutine[0]

func (*Monitor) TickChan

func (m *Monitor) TickChan() chan time.Time

@goroutine[0]

Jump to

Keyboard shortcuts

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