system

package
v0.0.0-debug-20260702 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 15 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 GoMaxProcs

func GoMaxProcs() int

GoMaxProcs returns the maximum number of CPUs that can be executing goroutine. co-operate with SetGoMaxProcs

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.

func SetGoMaxProcs

func SetGoMaxProcs(n int) (ret int)

SetGoMaxProcs co-operate with pkg/cnservice/service.handleGoMaxProcs

Types

This section is empty.

Jump to

Keyboard shortcuts

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