diagnostics

package
v0.0.0-...-d9c351b Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SysInfo

type SysInfo struct {
	// Host
	OS                   string `json:"os"`              // ex: freebsd, linux
	Platform             string `json:"platform"`        // ex: ubuntu, linuxmint
	PlatformFamily       string `json:"platformFamily"`  // ex: debian, rhel
	PlatformVersion      string `json:"platformVersion"` // version of the complete OS
	KernelVersion        string `json:"kernelVersion"`   // version of the OS kernel (if available)
	KernelArch           string `json:"kernelArch"`      // native cpu architecture queried at runtime, as returned by `uname -m` or empty string in case of error
	VirtualizationSystem string `json:"virtualizationSystem"`
	VirtualizationRole   string `json:"virtualizationRole"` // guest or host

	// CPU
	CPUInfo []cpu.InfoStat

	// Memory
	// Total amount of RAM on this system
	MemoryTotal uint64 `json:"total"`

	// RAM available for programs to allocate
	//
	// This value is computed from the kernel specific values.
	MemoryAvailable uint64 `json:"available"`

	// RAM used by programs
	//
	// This value is computed from the kernel specific values.
	MemoryUsed uint64 `json:"used"`
}

SysInfo contains high level system information that can be used to diagnose issues related to the underlying system.

func GetSysInfo

func GetSysInfo() (*SysInfo, error)

GetSysInfo returns high level system information that can be used to diagnose issues related to the underlying system.

Jump to

Keyboard shortcuts

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