system

package module
v0.0.0-...-bae18b2 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Reference: https://www.dmtf.org/standards/smbios

Index

Constants

This section is empty.

Variables

View Source
var Verbosity uint8

Functions

func AltUUID

func AltUUID() (uuid.UUID, error)

AltUUID provides a reproducable system-UUID for systems (VMs) that do not have a value set.

Consisting of the following UTS bytes: Nodename - Usually only set once for a VM. Machine - Archtecture like x86_64 or arm64. (immutable) Sysname - VM's usually get a new deployment on reinstall. (Linux/FreeBSD/...)

These bytes get hashed by xxhash. The returned 16 bytes have special values of "e" at postions 6,8,10 to identify as pseudo system-uuid.

Example: ec9692b4-a3c5-eeb7-eeb1-eeca85334893

Permissions: AltUUID does not need root privileges.

Beware!!! Use this only if UUID() did not return something useful or you're certain about the effects.

func MustUUID

func MustUUID() (uuid.UUID, error)

MustUUID will return a non null UUID, even if SMBIOS's system information is empty. Permissions: MustUUID() does need root privileges.

func UUID

func UUID() (uuid.UUID, error)

UUID() will reply with the SMBIOS's system information UUID. Permissions: UUID() does need root privileges.

Types

type Utsname

type Utsname struct {
	Sysname    []byte
	Nodename   []byte
	Release    []byte
	Version    []byte
	Machine    []byte
	Domainname []byte
}

func Uname

func Uname() (*Utsname, error)

Uname returns a pointer on a filled datastrutre of Utsname, if err is nil.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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