metric

package
v1.39.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupPreCpuMap

func CleanupPreCpuMap()

Types

type CpuInfo

type CpuInfo struct {
	User    float32 `json:"user"`
	Nice    float32 `json:"nice"`
	System  float32 `json:"system"`
	Idle    float32 `json:"idle"`
	IoWait  float32 `json:"ioWait"`
	Irq     float32 `json:"irq"`
	SoftIrq float32 `json:"softIrq"`
	Steal   float32 `json:"steal"`
	Guest   float32 `json:"guest"`
	CoreNum int     `json:"coreNum"`
}

type FsInfo

type FsInfo struct {
	MountPoint string `json:"mountPoint"`
	Used       uint64 `json:"used"`
	Free       uint64 `json:"free"`
}

type Network

type Network struct {
	Ipv4 string `json:"ipv4"`
	Ipv6 string `json:"ipv6"`
	Rx   uint64 `json:"rx"`
	Tx   uint64 `json:"tx"`
}

type Runner

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

func (*Runner) Add

func (r *Runner) Add(f func() error)

func (*Runner) Wait

func (r *Runner) Wait() []error

type Stat

type Stat struct {
	Uptime         int64              `json:"uptime"`
	Hostname       string             `json:"hostname"`
	Load1          string             `json:"load1"`
	Load5          string             `json:"load5"`
	Load10         string             `json:"load10"`
	RunningProcess string             `json:"runningProcess"`
	TotalProcess   string             `json:"totalProcess"`
	MemTotal       int64              `json:"memTotal"`
	MemFree        int64              `json:"memFree"`
	MemBuffers     int64              `json:"memBuffers"`
	MemAvailable   int64              `json:"memAvailable"`
	MemCached      int64              `json:"memCached"`
	SwapTotal      int64              `json:"swapTotal"`
	SwapFree       int64              `json:"swapFree"`
	FsInfos        []FsInfo           `json:"fsInfos"`
	Network        map[string]Network `json:"network"`
	Cpu            CpuInfo            `json:"cpu"`
}

func GetAllStat

func GetAllStat(client *ssh.Client, stats *Stat) (*Stat, error)

Jump to

Keyboard shortcuts

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