sysinfo

package
v3.18.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2022 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrDockerNotFound is returned if a Docker ID is not found in
	// /proc/self/cgroup
	ErrDockerNotFound = errors.New("Docker ID not found")
)
View Source
var (
	// ErrFeatureUnsupported indicates unsupported platform.
	ErrFeatureUnsupported = errors.New("That feature is not supported on this platform")
)

Functions

func BootID

func BootID() (string, error)

BootID returns the boot ID of the executing kernel.

func BytesToMebibytes

func BytesToMebibytes(bts uint64) uint64

BytesToMebibytes converts bytes into mebibytes.

func DockerID

func DockerID() (string, error)

DockerID attempts to detect Docker.

func Hostname

func Hostname() (string, error)

Hostname returns the host name.

func PhysicalMemoryBytes

func PhysicalMemoryBytes() (uint64, error)

PhysicalMemoryBytes returns the total amount of host memory.

Types

type Usage

type Usage struct {
	System time.Duration
	User   time.Duration
}

Usage contains process process times.

func GetUsage

func GetUsage() (Usage, error)

GetUsage gathers process times.

Jump to

Keyboard shortcuts

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