sys

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2021 License: AGPL-3.0 Imports: 7 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMaxMemoryLimit

func GetMaxMemoryLimit() (curLimit, maxLimit uint64, err error)

GetMaxMemoryLimit - returns the maximum size of the process's virtual memory (address space) in bytes.

func GetMaxOpenFileLimit

func GetMaxOpenFileLimit() (curLimit, maxLimit uint64, err error)

GetMaxOpenFileLimit - returns maximum file descriptor number that can be opened by this process.

func GetMaxThreads

func GetMaxThreads() (int, error)

GetMaxThreads returns the maximum number of threads that the system can create.

func SetMaxMemoryLimit

func SetMaxMemoryLimit(curLimit, maxLimit uint64) error

SetMaxMemoryLimit - sets the maximum size of the process's virtual memory (address space) in bytes.

func SetMaxOpenFileLimit

func SetMaxOpenFileLimit(curLimit, maxLimit uint64) error

SetMaxOpenFileLimit - sets maximum file descriptor number that can be opened by this process.

Types

type Stats

type Stats struct {
	TotalRAM uint64 // Physical RAM size in bytes,
}

Stats - system statistics.

func GetStats

func GetStats() (stats Stats, err error)

GetStats - return system statistics, currently only supported value is TotalRAM.

Jump to

Keyboard shortcuts

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