sysinfo

package
v0.0.0-...-c511dfe Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2020 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInfo

func GetInfo(w http.ResponseWriter, r *http.Request)

GetInfo returns the system information

Types

type SysInfo

type SysInfo struct {
	Uptime   time.Duration `json:"uptime,omitempty"`   // time since boot
	Load     float64       `json:"load,omitempty"`     // 1 minute load average divided by number of CPU Cores
	TotalRAM uint64        `json:"totalram,omitempty"` // total usable main memory size [kB]
	FreeRAM  uint64        `json:"freeram,omitempty"`  // available memory size [kB]
	UsedGB   uint64        `json:"usedgb,omitempty"`   // Used GB of HDD
	TotalGB  uint64        `json:"totalgb,omitempty"`  // Total GB of HDD
}

SysInfo represents global sustem information

func Info

func Info() (*SysInfo, error)

Info returns a complete system information object on unix

Jump to

Keyboard shortcuts

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