Documentation ¶
Index ¶
Constants ¶
View Source
const ( // UnameNull is a placeholder. UnameNull unameFlags = iota // UnameOS is "sysname" or "uname -s". UnameOS // UnameArch is "machine" or "uname -m". UnameArch // UnameRelease is "release" or "uname -r". UnameRelease // UnameDomain is "domainname", the kernel domain name. UnameDomain // UnameHostname is "Nodename" or "uname -n" UnameHostname // UnameVersion is "version", or "uname -v". UnameVersion )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RAMInfo ¶ added in v0.7.7
type RAMInfo struct { Total int64 // Free is the amount of memory that is not being used. // This does not take into account memory that is being used for caching. // For more information, see the comments at the top of this file. Free int64 Used int64 Buffers int64 Cached int64 SwapTotal int64 SwapFree int64 // contains filtered or unexported fields }
RAMInfo is a struct that contains information about the running system's memory. Please see important notes in the struct definition.
type SystemInfo ¶ added in v0.7.7
type SystemInfo struct { // Uptime is the time since the system was booted. Uptime time.Duration // Loads is a 3 element array containing the 1, 5, and 15 minute load averages. Loads [3]uint64 // RAM is a struct containing information about the system's RAM. See notes on this. RAM RAMInfo // Procs is the number of current processes. Procs uint16 }
func Sysinfo ¶ added in v0.7.7
func Sysinfo() (systemInfo *SystemInfo, err error)
Sysinfo returns a SystemInfo struct containing information about the running system. For memory, please see important notes in the RAMInfo struct definition and the top of this file. Be sure to check err before using the returned value.
Click to show internal directories.
Click to hide internal directories.