sys

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

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

Go to latest
Published: Dec 4, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

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