vsys

package
v0.0.0-...-3b984fc Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEndpoints

func GetEndpoints() []*vnet.Endpoint

GetEndpoints - get REST endpoints related to operating and runtime systems

Types

type CPUInfo

type CPUInfo struct {
	NumPhysical int `json:"numPhysical"`
	NumLogical  int `json:"numLogical"`
}

CPUInfo - cpu information

func GetCPUInfo

func GetCPUInfo() (cpuInfo *CPUInfo, err error)

GetCPUInfo - gives information about the CPU/CPUs of ther server

type CPUStats

type CPUStats struct {
	Usage         []float64 `json:"usage"`
	CombinedUsage float64   `json:"combinedUsage"`
}

CPUStats - Statistics about the CPU

func GetCPUStats

func GetCPUStats() (cpuStats *CPUStats, err error)

GetCPUStats - get system CPU stats, number of cores, usage...

type DiskInfo

type DiskInfo struct {
	Path   string `json:"path"`
	Fstype string `json:"fstype"`
	Total  uint64 `json:"total"`
	Free   uint64 `json:"free"`
	Used   uint64 `json:"used"`
}

DiskInfo - disk info and usage

func GetDiskInfo

func GetDiskInfo() (diskInfo []*DiskInfo, err error)

GetDiskInfo - get stats for all the disks in the system

type MemoryStats

type MemoryStats struct {
	Total uint64 `json:"total"`
	Used  uint64 `json:"used"`
	Free  uint64 `json:"free"`
}

MemoryStats - memory statistics

func GetMemStats

func GetMemStats() (memStats *MemoryStats, err error)

GetMemStats - get memory stats

type SysInfo

type SysInfo struct {
	CPUInfo  *CPUInfo    `json:"cpuInfo"`
	DiskInfo []*DiskInfo `json:"diskInfo"`
}

SysInfo - system info, less frequently changing

func GetSysInfo

func GetSysInfo() (sysInfo *SysInfo, err error)

GetSysInfo - gets system info

type SysStat

type SysStat struct {
	CPUStats    *CPUStats    `json:"cpuStats"`
	MemoryStats *MemoryStats `json:"memoryStats"`
}

SysStat - system stats for the server

func GetSysStats

func GetSysStats() (sysStats *SysStat, err error)

GetSysStats - get system statistics at the time of the call

Jump to

Keyboard shortcuts

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