host

package
v0.2.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHostInfo

func GetHostInfo(interval int, cmdStr string) string

Types

type ServerInfo

type ServerInfo struct {
	Interval      int     `json:"interval"`
	Uptime        uint64  `json:"uptime"`
	System        string  `json:"system"`
	CPUCores      int     `json:"cpu_cores"`
	CPUModelName  string  `json:"cpu_model"`
	CPU           float64 `json:"cpu"`
	Load1         string  `json:"load_1"`
	Load5         string  `json:"load_5"`
	Load15        string  `json:"load_15"`
	MemoryTotal   uint64  `json:"memory_total"`
	MemoryUsed    uint64  `json:"memory_used"`
	SwapTotal     uint64  `json:"swap_total"`
	SwapUsed      uint64  `json:"swap_used"`
	DiskTotal     uint64  `json:"hdd_total"`
	DiskUsed      uint64  `json:"hdd_used"`
	NetWorkIn     string  `json:"network_in"`
	NetWorkOut    string  `json:"network_out"`
	Process       int     `json:"process"`
	Thread        int     `json:"thread"`
	TCP           int     `json:"tcp"`
	UDP           int     `json:"udp"`
	Version       string  `json:"version"`
	ClientVersion string  `json:"client_version"`
}

Jump to

Keyboard shortcuts

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