Help us shape the future of Go! Take the 2026 Go Developer Survey

machine

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2016 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClockSpeed

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

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

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)

Types

This section is empty.

Jump to

Keyboard shortcuts

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