machine

package
v0.27.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2017 License: Apache-2.0 Imports: 17 Imported by: ? 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

Overview

The machine package contains functions that extract machine-level specs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainerOsVersion

func ContainerOsVersion() string

func GetClockSpeed

func GetClockSpeed(procInfo []byte) (uint64, error)

GetClockSpeed returns the CPU clock speed, given a []byte formatted as the /proc/cpuinfo file.

func GetHugePagesInfo added in v0.27.0

func GetHugePagesInfo() ([]info.HugePagesInfo, error)

GetHugePagesInfo returns information about pre-allocated huge pages

func GetMachineMemoryCapacity

func GetMachineMemoryCapacity() (uint64, error)

GetMachineMemoryCapacity returns the machine's total memory from /proc/meminfo. Returns the total memory capacity as an uint64 (number of bytes).

func GetMachineSwapCapacity

func GetMachineSwapCapacity() (uint64, error)

GetMachineSwapCapacity returns the machine's total swap from /proc/meminfo. Returns the total swap capacity as an uint64 (number of bytes).

func GetTopology

func GetTopology(sysFs sysfs.SysFs, cpuinfo string) ([]info.Node, int, error)

func Info

func Info(sysFs sysfs.SysFs, fsInfo fs.FsInfo, inHostNamespace bool) (*info.MachineInfo, error)

func KernelVersion

func KernelVersion() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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