system

package
v1.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CPUAvailable

func CPUAvailable() float64

CPUAvailable returns the available cpu of this node.

func GoRoutines

func GoRoutines() int

GoRoutines returns the number of goroutine.

func InContainer

func InContainer() bool

InContainer returns if the process is running in a container.

func MemoryAvailable

func MemoryAvailable() uint64

MemoryAvailable returns the available size of memory of this node.

func MemoryGolang

func MemoryGolang() int

MemoryGolang returns the total size of golang's memory.

func MemoryTotal

func MemoryTotal() uint64

MemoryTotal returns the total size of memory of this node.

func MemoryUsed

func MemoryUsed() uint64

func NumCPU

func NumCPU() int

NumCPU return the total number of CPU of this node.

func Run

func Run(stopper *stopper.Stopper)

Run starts a new goroutine go calculate the CPU usage.

Types

This section is empty.

Jump to

Keyboard shortcuts

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