general

package
v0.0.51 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetArchitecture added in v0.0.30

func GetArchitecture() (architecture string, err error)

function designed to get the system architecture (32-bit or 64-bit)

func GetKernelVersion added in v0.0.31

func GetKernelVersion() (version string, err error)

function designed to get the kernel version.

Types

type AllCpuInfo

type AllCpuInfo struct {
	Cpus           []CpuInfo
	ProcessorCount int
	Raw            []byte
}

structure designed to hold the information related to all the CPUs on a machine.

func GetCPUInfo

func GetCPUInfo() (info AllCpuInfo, err error)

function deisgned to read the cpuinfo file and pull out information of interest. this will help give a better understanding of the machine's CPU(s).

type BasicSysInfo added in v0.0.29

type BasicSysInfo struct {
	Hostname        string
	OperatingSystem OSInfo
	// this systemid is the productid returned
	// from the systeminfo command on windows.
	// this will be an empty string on linux.
	SystemId string
}

structure designed to hold the basic system information for a given machine.

func GetSysInfo added in v0.0.29

func GetSysInfo() (info BasicSysInfo, err error)

function designed to grab the general system information for a linux machine.

type CpuInfo

type CpuInfo struct {
	ProcessorModel  string
	ProcessorSpeed  float64
	ProcessorVendor string
}

structure designed to hold the information related to a single CPU (processor) on a machine.

type MountInfo

type MountInfo struct {
	Name       string
	Location   string
	Type       string
	Privileges string
}

structure designed to hold the information related to a system mount.

func EnumMounts

func EnumMounts() (mounts []MountInfo, err error)

function designed to discover the mounts on a linux system. this will give the name, location, type, and privileges.

this uses the "mount" command to list all the mounts the user can see, then parses the information and returns a slice of MountInfo structs.

type OSInfo added in v0.0.29

type OSInfo struct {
	Name         string
	Version      string
	Manufacturer string
	Domain       string
	// on linux machines, this slice will be nil.
	// this is only applicable to windows machines.
	Hotfixes []string
}

structure designed to hold the basic information about a machine's operating system.

Jump to

Keyboard shortcuts

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