hostinfo

package
v0.0.0-...-1d5bf40 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CpuUsage

func CpuUsage() (float64, error)

CpuUsage returns cpu usage percent from last call

func RootFsStat

func RootFsStat() (*disk.UsageStat, error)

RootFsStat return rootfs info of host

Types

type CpuInfo

type CpuInfo struct {
	Count int64
	cpu.InfoStat
}

func CpuStat

func CpuStat() (CpuInfo, error)

CpuStat returns host cpu information

type MemInfo

type MemInfo struct {
	Total   int64
	Used    int64
	Free    int64
	Percent float64
}

func MemStat

func MemStat() (MemInfo, error)

MemStat returns host mem information

Jump to

Keyboard shortcuts

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