monitor

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FsStats

type FsStats struct {
	Total     uint64
	Free      uint64
	Available uint64
}

type Info

type Info struct {
	Runtime RuntimeInfo
	Os      OsInfo
}

type OsCpuLoad

type OsCpuLoad struct {
	Load1  float64
	Load5  float64
	Load15 float64
}

type OsCpuStats

type OsCpuStats struct {
	Percent     float64
	LoadAverage OsCpuLoad
}

type OsInfo

type OsInfo struct {
	Name       string
	Platform   string
	Arch       string
	Version    string
	Processors int
}

type OsMemStats

type OsMemStats struct {
	Total uint64
	Free  uint64
}

type OsStats

type OsStats struct {
	Cpu OsCpuStats
	Mem OsMemStats
}

type ProcStats

type ProcStats struct {
	CpuPercent      float64
	MemTotalVirtual uint64
	NumFDs          int32
}

type RuntimeInfo

type RuntimeInfo struct {
	Pid     int
	Version string
}

type RuntimeStats

type RuntimeStats struct {
	HeapAlloc uint64
	HeapSys   uint64
}

type Service

type Service struct{}

func NewService

func NewService() *Service

func (*Service) Info

func (s *Service) Info() Info

func (*Service) Stats

func (s *Service) Stats() Stats

type Stats

type Stats struct {
	Runtime RuntimeStats
	Os      OsStats
	Fs      FsStats
	Proc    ProcStats
}

Jump to

Keyboard shortcuts

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