Documentation
¶
Index ¶
Constants ¶
View Source
const KB = uint64(1024)
Variables ¶
This section is empty.
Functions ¶
func GetDiskUsage ¶
return disk usage as GiB
TODO different functions for all disks / a specified disk? FIXME Wrong Disk values for docker !!! (probably because counting also virtual mountpoints?)
func GetDisks ¶
func GetDisks() []disk.PartitionStat
return all physical disks, USB and CD-ROM devices
An example output: device: /dev/example, mountpoint: /, fstype: ext4, opts:rw,noatime
Types ¶
type CPU ¶
type CPU struct { Vendor string `json:"vendor,omitempty"` Model string `json:"model,omitempty"` Speed uint `json:"speed,omitempty"` // CPU clock rate in MHz Cache uint `json:"cache,omitempty"` // CPU cache size in KB Cpus uint `json:"cpus,omitempty"` // number of physical CPUs Cores uint `json:"cores,omitempty"` // number of physical CPU cores Threads uint `json:"threads,omitempty"` // number of logical (HT) CPU cores }
type System ¶
type System struct { Kernel Kernel `json:"kernel"` OS OS `json:"OS"` Node Node `json:"node"` CPU CPU `json:"cpu"` Memory Memory `json:"memory"` Disk Disk `json:"disk"` }
func (*System) GetSystemInfo ¶
func (h *System) GetSystemInfo()
initializes all hardware structs that gets software and hardware (system) information
Source Files
¶
Click to show internal directories.
Click to hide internal directories.