system

package
v0.0.0-...-bdb06d8 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2018 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHostProc

func GetHostProc() string

Types

type CPUStats

type CPUStats struct {
	PerCPU         bool `toml:"percpu"`
	TotalCPU       bool `toml:"totalcpu"`
	CollectCPUTime bool `toml:"collect_cpu_time"`
	ReportActive   bool `toml:"report_active"`
	// contains filtered or unexported fields
}

func NewCPUStats

func NewCPUStats(ps PS) *CPUStats

func (*CPUStats) Description

func (_ *CPUStats) Description() string

func (*CPUStats) Gather

func (s *CPUStats) Gather(acc tinymonitor.Accumulator) error

func (*CPUStats) SampleConfig

func (_ *CPUStats) SampleConfig() string

type DiskIO

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

func (*DiskIO) Description

func (_ *DiskIO) Description() string

func (*DiskIO) Gather

func (s *DiskIO) Gather(acc tinymonitor.Accumulator) error

func (*DiskIO) SampleConfig

func (_ *DiskIO) SampleConfig() string

type DiskStats

type DiskStats struct {

	// Legacy support
	Mountpoints []string

	MountPoints []string
	IgnoreFS    []string `toml:"ignore_fs"`
	// contains filtered or unexported fields
}

func (*DiskStats) Description

func (_ *DiskStats) Description() string

func (*DiskStats) Gather

func (s *DiskStats) Gather(acc tinymonitor.Accumulator) error

func (*DiskStats) SampleConfig

func (_ *DiskStats) SampleConfig() string

type Kernel

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

func (*Kernel) Description

func (k *Kernel) Description() string

func (*Kernel) Gather

func (k *Kernel) Gather(acc tinymonitor.Accumulator) error

func (*Kernel) SampleConfig

func (k *Kernel) SampleConfig() string

type KernelVmstat

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

func (*KernelVmstat) Description

func (k *KernelVmstat) Description() string

func (*KernelVmstat) Gather

func (k *KernelVmstat) Gather(acc tinymonitor.Accumulator) error

func (*KernelVmstat) SampleConfig

func (k *KernelVmstat) SampleConfig() string

type MemStats

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

func (*MemStats) Description

func (_ *MemStats) Description() string

func (*MemStats) Gather

func (s *MemStats) Gather(acc tinymonitor.Accumulator) error

func (*MemStats) SampleConfig

func (_ *MemStats) SampleConfig() 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 MountOptions

type MountOptions []string

func (MountOptions) Mode

func (opts MountOptions) Mode() string

type NetIOStats

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

func (*NetIOStats) Description

func (_ *NetIOStats) Description() string

func (*NetIOStats) Gather

func (s *NetIOStats) Gather(acc tinymonitor.Accumulator) error

func (*NetIOStats) SampleConfig

func (_ *NetIOStats) SampleConfig() string

type NetStats

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

func (*NetStats) Description

func (_ *NetStats) Description() string

func (*NetStats) Gather

func (s *NetStats) Gather(acc tinymonitor.Accumulator) error

func (*NetStats) SampleConfig

func (_ *NetStats) SampleConfig() 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) Description

func (p *Processes) Description() string

func (*Processes) Gather

func (p *Processes) Gather(acc tinymonitor.Accumulator) error

func (*Processes) SampleConfig

func (p *Processes) SampleConfig() string

type SwapStats

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

func (*SwapStats) Description

func (_ *SwapStats) Description() string

func (*SwapStats) Gather

func (s *SwapStats) Gather(acc tinymonitor.Accumulator) error

func (*SwapStats) SampleConfig

func (_ *SwapStats) SampleConfig() string

type SysctlFS

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

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

func (SysctlFS) Description

func (_ SysctlFS) Description() string

func (*SysctlFS) Gather

func (sfs *SysctlFS) Gather(acc tinymonitor.Accumulator) error

func (SysctlFS) SampleConfig

func (_ SysctlFS) SampleConfig() string

type SystemStats

type SystemStats struct{}

func (*SystemStats) Description

func (_ *SystemStats) Description() string

func (*SystemStats) Gather

func (_ *SystemStats) Gather(acc tinymonitor.Accumulator) error

func (*SystemStats) SampleConfig

func (_ *SystemStats) SampleConfig() string

Jump to

Keyboard shortcuts

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