smbios

package
v0.0.0-...-20aa718 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BIOS

type BIOS struct {
	Vendor          string
	Version         string
	ReleaseDate     string
	MajorRelease    uint8
	MinorRelease    uint8
	Characteristics []string
}

BIOS represents a BIOS spec

type Baseboard

type Baseboard struct {
	Manufacturer string
	Product      string
	Version      string
	SerialNumber string
	AssetTag     string
	BoardType    string
}

Baseboard represents a baseboard spec

type Cache

type Cache struct {
	SocketDesignation   string
	OperationalMode     string
	Enabled             bool
	Location            string
	Socketed            bool
	Level               uint8
	MaximumCacheSize    uint32
	InstalledSize       uint32
	SupportedSRAMType   []string
	CurrentSRAMType     string
	CacheSpeed          uint8
	ErrorCorrectionType string
	SystemCacheType     string
	Associativity       string
}

Cache represents a cache spec

type Chassis

type Chassis struct {
	Manufacturer       string
	Version            string
	SerialNumber       string
	AssetTagNumber     string
	BootUpState        string
	PowerSupplyState   string
	ThermalState       string
	Height             uint8 // OCP server does NOT support this field
	NumberOfPowerCords uint8
	SKUNumber          string
}

Chassis represents a chassis spec

type Data

type Data interface{}

Data represents a smbios content as generic type

type Header struct {
	Type   uint8
	Handle uint16
}

Header represents a smbios header

type MemoryDevice

type MemoryDevice struct {
	TotalWidth        uint16
	DataWidth         uint16
	Size              uint32 // GiB
	DeviceLocator     string
	BankLocator       string
	Manufacturer      string
	SerialNumber      string
	AssetTag          string
	PartNumber        string
	Speed             uint16
	ConfiguredSpeed   uint16
	MinVoltage        float32
	MaxVoltage        float32
	ConfiguredVoltage float32
	FormFactor        string
	Type              string
	TypeDetail        []string
}

MemoryDevice represents a memory module spec

type PowerSupply

type PowerSupply struct {
	Location         string
	DeviceName       string
	Manufacturer     string
	SerialNumber     string
	AssetTagNumber   string
	ModelPartNumber  string
	RevisionLevel    string
	MaxPowerCapacity uint16
	Plugged          bool
	Present          bool
	HotReplaceable   bool
}

PowerSupply represents a power supply spec

type Processor

type Processor struct {
	SocketDesignation string
	Manufacturer      string
	Version           string
	Voltage           float32
	ExternalClock     uint16
	MaxSpeed          uint16 // This field identifies a capability for the system, not the processor itself.
	CurrentSpeed      uint16 // This field identifies the processor's speed at system boot; the processor may support more than one speed.
	Status            []string
	L1CacheHandle     uint16
	L1Cache           *Cache
	L2CacheHandle     uint16
	L2Cache           *Cache
	L3CacheHandle     uint16
	L3Cache           *Cache
	SerialNumber      string
	AssetTag          string
	PartNumber        string
	CoreCount         uint16
	CoreEnabled       uint16
	ThreadCount       uint16
}

Processor represents a processor spec

NOTE: this package ignores 0x08 Processor ID field bacause DMI v3.1.1 does NOT support extra features id.

type Spec

type Spec struct {
	Major   int
	Minor   int
	Rev     int
	Records map[uint8][]*Structure
}

Spec represents a smbios spec

func NewDecoder

func NewDecoder() *Spec

NewDecoder creates and initializes a Spec

func (*Spec) Decode

func (s *Spec) Decode() error

Decode makes Spec satisfy the mox.Decoder interface

func (Spec) GetBIOS

func (s Spec) GetBIOS() *BIOS

GetBIOS returns BIOS

func (Spec) GetBaseboard

func (s Spec) GetBaseboard() *Baseboard

GetBaseboard returns Baseboard

func (Spec) GetChassis

func (s Spec) GetChassis() *Chassis

GetChassis returns Chassis

func (Spec) GetMemoryDevice

func (s Spec) GetMemoryDevice() []*MemoryDevice

GetMemoryDevice returns MemoryDevice(s)

func (Spec) GetPowerSupply

func (s Spec) GetPowerSupply() []*PowerSupply

GetPowerSupply returns PowerSuppl(y|ies)

func (Spec) GetProcessor

func (s Spec) GetProcessor() []*Processor

GetProcessor returns Processor(s)

func (Spec) GetSystem

func (s Spec) GetSystem() *System

GetSystem returns System

func (Spec) Version

func (s Spec) Version() string

Version returns the version string of smbios

type Structure

type Structure struct {
	Header *Header
	Data   Data
}

Structure represents a smbios table

type System

type System struct {
	Manufacturer string
	ProductName  string
	Version      string
	SerialNumber string
	SKUNumber    string
	Family       string
}

System represents a system spec

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳