Documentation ¶
Index ¶
Constants ¶
View Source
const MaxCPULoadResolution = loadPollIntervalWindows
MaxCPULoadResolution is the maximum guaranteed temporal resolution of the CPU load average. Calling CPULoad more often than MaxCPULoadResolution may yield duplicate results.
View Source
const UnknownOSInfo = "UNKNOWN"
UnknownOSInfo is returned as OSName, OSVersion or OSFlavour if the OS information could not be retrieved.
Variables ¶
This section is empty.
Functions ¶
func CPULoad ¶ added in v0.11.0
func CPULoad() (oneMinuteAvg, fiveMinuteAvg, fifteenMinuteAvg float64)
CPULoad retrieves the normalized 1-, 5-, and 15-minute averages of the CPU load percentage.
func FreeRAM ¶ added in v0.5.0
FreeRAM returns the amount of free RAM available for allocation in bytes.
func FreeSwap ¶ added in v0.10.0
FreeSwap returns the amount of free RAM available for allocation in bytes.
Types ¶
type Info ¶
type Info struct { OSName string `json:"osName"` OSVersion string `json:"osVersion"` OSFlavour string `json:"osFlavour"` OSArch arch.T `json:"osArch"` Hostname string `json:"hostname"` IPs []string `json:"ips"` NumCPUs int `json:"numCPUs"` TotalRAM uintptr `json:"totalRAM"` TotalSwap uintptr `json:"totalSwap"` }
Info contains information about the running system.
Click to show internal directories.
Click to hide internal directories.