system

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2017 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CPUStats

type CPUStats struct {
	PerCPU         bool
	TotalCPU       bool
	CollectCPUTime bool
	// contains filtered or unexported fields
}

func NewCPUStats

func NewCPUStats(ps PS) *CPUStats

func (*CPUStats) Collect

func (s *CPUStats) Collect() (datas []map[string]interface{}, err error)

func (*CPUStats) Name

func (_ *CPUStats) Name() string

func (*CPUStats) SampleConfig

func (_ *CPUStats) SampleConfig() string

type DiskIOStats

type DiskIOStats struct {
	Devices          []string
	DeviceTags       []string
	NameTemplates    []string
	SkipSerialNumber bool
	// contains filtered or unexported fields
}

func (*DiskIOStats) Collect

func (s *DiskIOStats) Collect() (datas []map[string]interface{}, err error)

func (*DiskIOStats) Name

func (_ *DiskIOStats) Name() string

type DiskStats

type DiskStats struct {

	// Legacy support
	Mountpoints []string

	MountPoints []string
	IgnoreFS    []string
	// contains filtered or unexported fields
}

func (*DiskStats) Collect

func (s *DiskStats) Collect() (datas []map[string]interface{}, err error)

func (*DiskStats) Name

func (_ *DiskStats) Name() string

func (*DiskStats) SampleConfig

func (_ *DiskStats) SampleConfig() string

type Kernel

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

func (*Kernel) Collect

func (k *Kernel) Collect() (datas []map[string]interface{}, err error)

func (*Kernel) Name

func (k *Kernel) Name() string

type KernelVmstat

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

func (*KernelVmstat) Collect

func (k *KernelVmstat) Collect() (datas []map[string]interface{}, err error)

func (*KernelVmstat) Name

func (k *KernelVmstat) Name() string

type MemStats

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

func (*MemStats) Collect

func (s *MemStats) Collect() (datas []map[string]interface{}, err error)

func (*MemStats) Name

func (_ *MemStats) Name() string

type MockPS

type MockPS struct {
	mock.Mock
	PSDiskDeps
}

func (*MockPS) CPUTimes

func (m *MockPS) CPUTimes(perCPU, totalCPU bool) ([]cpu.TimesStat, error)

func (*MockPS) DiskIO

func (m *MockPS) DiskIO(names []string) (map[string]disk.IOCountersStat, error)

func (*MockPS) DiskUsage

func (m *MockPS) DiskUsage(mountPointFilter []string, fstypeExclude []string) ([]*disk.UsageStat, []*disk.PartitionStat, error)

func (*MockPS) LoadAvg

func (m *MockPS) LoadAvg() (*load.AvgStat, error)

func (*MockPS) NetConnections

func (m *MockPS) NetConnections() ([]net.ConnectionStat, error)

func (*MockPS) NetIO

func (m *MockPS) NetIO() ([]net.IOCountersStat, error)

func (*MockPS) NetProto

func (m *MockPS) NetProto() ([]net.ProtoCountersStat, error)

func (*MockPS) SwapStat

func (m *MockPS) SwapStat() (*mem.SwapMemoryStat, error)

func (*MockPS) VMStat

func (m *MockPS) VMStat() (*mem.VirtualMemoryStat, error)

type MockPSDisk

type MockPSDisk struct {
	*mock.Mock
	// contains filtered or unexported fields
}

func (MockPSDisk) CPUTimes

func (s MockPSDisk) CPUTimes(perCPU, totalCPU bool) ([]cpu.TimesStat, error)

func (MockPSDisk) DiskIO

func (s MockPSDisk) DiskIO(names []string) (map[string]disk.IOCountersStat, error)

func (MockPSDisk) DiskUsage

func (s MockPSDisk) DiskUsage(
	mountPointFilter []string,
	fstypeExclude []string,
) ([]*disk.UsageStat, []*disk.PartitionStat, error)

func (MockPSDisk) NetConnections

func (s MockPSDisk) NetConnections() ([]net.ConnectionStat, error)

func (MockPSDisk) NetIO

func (s MockPSDisk) NetIO() ([]net.IOCountersStat, error)

func (MockPSDisk) NetProto

func (s MockPSDisk) NetProto() ([]net.ProtoCountersStat, error)

func (MockPSDisk) SwapStat

func (s MockPSDisk) SwapStat() (*mem.SwapMemoryStat, error)

func (MockPSDisk) VMStat

func (s MockPSDisk) VMStat() (*mem.VirtualMemoryStat, error)

type NetIOStats

type NetIOStats struct {
	Interfaces []string
	// contains filtered or unexported fields
}

func (*NetIOStats) Collect

func (s *NetIOStats) Collect() (datas []map[string]interface{}, err error)

func (*NetIOStats) Name

func (_ *NetIOStats) Name() string

type NetStats

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

func (*NetStats) Collect

func (s *NetStats) Collect() (datas []map[string]interface{}, err error)

func (*NetStats) Name

func (_ *NetStats) Name() string

type PS

type PS interface {
	CPUTimes(perCPU, totalCPU bool) ([]cpu.TimesStat, error)
	DiskUsage(mountPointFilter []string, fstypeExclude []string) ([]*disk.UsageStat, []*disk.PartitionStat, error)
	NetIO() ([]net.IOCountersStat, error)
	NetProto() ([]net.ProtoCountersStat, error)
	DiskIO(names []string) (map[string]disk.IOCountersStat, error)
	VMStat() (*mem.VirtualMemoryStat, error)
	SwapStat() (*mem.SwapMemoryStat, error)
	NetConnections() ([]net.ConnectionStat, error)
}

type PSDiskDeps

type PSDiskDeps interface {
	Partitions(all bool) ([]disk.PartitionStat, error)
	OSGetenv(key string) string
	OSStat(name string) (os.FileInfo, error)
	PSDiskUsage(path string) (*disk.UsageStat, error)
}

type Processes

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

func (*Processes) Collect

func (p *Processes) Collect() (datas []map[string]interface{}, err error)

func (*Processes) Name

func (p *Processes) Name() string

type SwapStats

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

func (*SwapStats) Collect

func (s *SwapStats) Collect() (datas []map[string]interface{}, err error)

func (*SwapStats) Name

func (_ *SwapStats) Name() string

type SysctlFS

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

https://www.kernel.org/doc/Documentation/sysctl/fs.txt

func (*SysctlFS) Collect

func (sfs *SysctlFS) Collect() (datas []map[string]interface{}, err error)

func (SysctlFS) Name

func (_ SysctlFS) Name() string

type SystemStats

type SystemStats struct{}

func (*SystemStats) Collect

func (_ *SystemStats) Collect() (datas []map[string]interface{}, err error)

func (*SystemStats) Name

func (_ *SystemStats) Name() string

Jump to

Keyboard shortcuts

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