Documentation
¶
Overview ¶
Package gosmbios provides pure Go implementation for reading SMBIOS/DMI data across Windows, Linux, and macOS on both AMD64 and ARM64 architectures. Implements DSP0134 SMBIOS Reference Specification Version 3.9.0
Index ¶
Constants ¶
const Version = "3.9.0"
Version represents the SMBIOS specification version implemented
Variables ¶
var ( ErrNotFound = errors.New("smbios: entry point not found") ErrInvalidChecksum = errors.New("smbios: invalid checksum") ErrUnsupportedOS = errors.New("smbios: unsupported operating system") ErrAccessDenied = errors.New("smbios: access denied (try running as root/admin)") ErrInvalidStructure = errors.New("smbios: invalid structure format") )
Common errors
Functions ¶
This section is empty.
Types ¶
type EntryPoint ¶
type EntryPoint struct {
Type EntryPointType
MajorVersion uint8
MinorVersion uint8
Revision uint8 // Only for 3.x
TableAddress uint64
TableLength uint32
TableMaxSize uint32 // Only for 3.x
StructureCount uint16 // Only for 2.x (not reliable for 3.x)
BCDRevision uint8 // Only for 2.x
EntryPointLength uint8
}
EntryPoint contains SMBIOS entry point information
func ParseEntryPoint32 ¶
func ParseEntryPoint32(data []byte) (*EntryPoint, error)
ParseEntryPoint32 parses a 32-bit SMBIOS entry point (_SM_)
func ParseEntryPoint64 ¶
func ParseEntryPoint64(data []byte) (*EntryPoint, error)
ParseEntryPoint64 parses a 64-bit SMBIOS entry point (_SM3_)
func (*EntryPoint) String ¶
func (ep *EntryPoint) String() string
String returns a human-readable version string
type EntryPointType ¶
type EntryPointType int
EntryPointType indicates the SMBIOS entry point version
const ( EntryPoint32Bit EntryPointType = iota // SMBIOS 2.x 32-bit entry point EntryPoint64Bit // SMBIOS 3.x 64-bit entry point )
type RawFileHeader ¶
type RawFileHeader struct {
Magic [9]byte // "SMBIOSRAW"
Version uint8 // File format version (1)
EntryPointType uint8 // 0 = 32-bit, 1 = 64-bit
MajorVersion uint8 // SMBIOS major version
MinorVersion uint8 // SMBIOS minor version
Revision uint8 // SMBIOS revision (3.x only)
Reserved uint8 // Padding
TableLength uint32 // Length of raw table data that follows
TableAddress uint64 // Original table address (for reference)
}
RawFileHeader represents the header of a raw SMBIOS dump file This is a simple header followed by the raw SMBIOS table bytes
type SMBIOS ¶
type SMBIOS struct {
EntryPoint EntryPoint
Structures []Structure
}
SMBIOS holds all parsed SMBIOS data
func Read ¶
Read reads and parses SMBIOS data from the system This is the main entry point for the library
func ReadFromFile ¶
ReadFromFile reads SMBIOS data from a binary dump file The file format is a simple binary format: - 32 bytes: Entry point header - Remaining: Raw SMBIOS table data
func (*SMBIOS) GetStructure ¶
GetStructure returns the first structure of the specified type, or nil if not found
func (*SMBIOS) GetStructures ¶
GetStructures returns all structures of the specified type
func (*SMBIOS) WriteToFile ¶
WriteToFile writes SMBIOS data to a binary dump file
type Structure ¶
type Structure struct {
Header Header
Data []byte // Raw formatted section data (includes header)
Strings []string // String table entries
}
Structure represents a single SMBIOS structure with its data and strings
func ParseStructures ¶
ParseStructures parses raw SMBIOS table data into individual structures
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
debug
command
Debug tool for SMBIOS data - displays raw structure information for all types
|
Debug tool for SMBIOS data - displays raw structure information for all types |
|
dump
command
smbiosdump - Tool to dump all SMBIOS data to a file
|
smbiosdump - Tool to dump all SMBIOS data to a file |
|
examples
command
Example usage of the gosmbios package
|
Example usage of the gosmbios package |
|
info
command
smbiosinfo - Simple tool to dump all SMBIOS information in a human-readable format
|
smbiosinfo - Simple tool to dump all SMBIOS information in a human-readable format |
|
Package types provides a convenient import for all SMBIOS type packages
|
Package types provides a convenient import for all SMBIOS type packages |
|
type0
Package type0 implements SMBIOS Type 0 - BIOS Information Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type0 implements SMBIOS Type 0 - BIOS Information Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type1
Package type1 implements SMBIOS Type 1 - System Information Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type1 implements SMBIOS Type 1 - System Information Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type10
Package type10 implements SMBIOS Type 10 - On Board Devices Information (Obsolete) Per DSP0134 SMBIOS Reference Specification 3.9.0 This structure is obsolete starting with SMBIOS 2.6 specification Use Type 41 (Onboard Devices Extended Information) instead
|
Package type10 implements SMBIOS Type 10 - On Board Devices Information (Obsolete) Per DSP0134 SMBIOS Reference Specification 3.9.0 This structure is obsolete starting with SMBIOS 2.6 specification Use Type 41 (Onboard Devices Extended Information) instead |
|
type11
Package type11 implements SMBIOS Type 11 - OEM Strings Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type11 implements SMBIOS Type 11 - OEM Strings Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type12
Package type12 implements SMBIOS Type 12 - System Configuration Options Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type12 implements SMBIOS Type 12 - System Configuration Options Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type127
Package type127 implements SMBIOS Type 127 - End-of-Table Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type127 implements SMBIOS Type 127 - End-of-Table Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type13
Package type13 implements SMBIOS Type 13 - BIOS Language Information Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type13 implements SMBIOS Type 13 - BIOS Language Information Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type14
Package type14 implements SMBIOS Type 14 - Group Associations Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type14 implements SMBIOS Type 14 - Group Associations Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type15
Package type15 implements SMBIOS Type 15 - System Event Log Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type15 implements SMBIOS Type 15 - System Event Log Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type16
Package type16 implements SMBIOS Type 16 - Physical Memory Array Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type16 implements SMBIOS Type 16 - Physical Memory Array Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type17
Package type17 implements SMBIOS Type 17 - Memory Device Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type17 implements SMBIOS Type 17 - Memory Device Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type18
Package type18 implements SMBIOS Type 18 - 32-Bit Memory Error Information Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type18 implements SMBIOS Type 18 - 32-Bit Memory Error Information Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type19
Package type19 implements SMBIOS Type 19 - Memory Array Mapped Address Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type19 implements SMBIOS Type 19 - Memory Array Mapped Address Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type2
Package type2 implements SMBIOS Type 2 - Baseboard (Module) Information Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type2 implements SMBIOS Type 2 - Baseboard (Module) Information Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type20
Package type20 implements SMBIOS Type 20 - Memory Device Mapped Address Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type20 implements SMBIOS Type 20 - Memory Device Mapped Address Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type21
Package type21 implements SMBIOS Type 21 - Built-in Pointing Device Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type21 implements SMBIOS Type 21 - Built-in Pointing Device Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type22
Package type22 implements SMBIOS Type 22 - Portable Battery Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type22 implements SMBIOS Type 22 - Portable Battery Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type23
Package type23 implements SMBIOS Type 23 - System Reset Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type23 implements SMBIOS Type 23 - System Reset Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type24
Package type24 implements SMBIOS Type 24 - Hardware Security Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type24 implements SMBIOS Type 24 - Hardware Security Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type25
Package type25 implements SMBIOS Type 25 - System Power Controls Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type25 implements SMBIOS Type 25 - System Power Controls Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type26
Package type26 implements SMBIOS Type 26 - Voltage Probe Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type26 implements SMBIOS Type 26 - Voltage Probe Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type27
Package type27 implements SMBIOS Type 27 - Cooling Device Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type27 implements SMBIOS Type 27 - Cooling Device Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type28
Package type28 implements SMBIOS Type 28 - Temperature Probe Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type28 implements SMBIOS Type 28 - Temperature Probe Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type29
Package type29 implements SMBIOS Type 29 - Electrical Current Probe Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type29 implements SMBIOS Type 29 - Electrical Current Probe Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type3
Package type3 implements SMBIOS Type 3 - System Enclosure or Chassis Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type3 implements SMBIOS Type 3 - System Enclosure or Chassis Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type30
Package type30 implements SMBIOS Type 30 - Out-of-Band Remote Access Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type30 implements SMBIOS Type 30 - Out-of-Band Remote Access Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type31
Package type31 implements SMBIOS Type 31 - Boot Integrity Services Entry Point Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type31 implements SMBIOS Type 31 - Boot Integrity Services Entry Point Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type32
Package type32 implements SMBIOS Type 32 - System Boot Information Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type32 implements SMBIOS Type 32 - System Boot Information Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type33
Package type33 implements SMBIOS Type 33 - 64-Bit Memory Error Information Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type33 implements SMBIOS Type 33 - 64-Bit Memory Error Information Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type34
Package type34 implements SMBIOS Type 34 - Management Device Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type34 implements SMBIOS Type 34 - Management Device Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type35
Package type35 implements SMBIOS Type 35 - Management Device Component Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type35 implements SMBIOS Type 35 - Management Device Component Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type36
Package type36 implements SMBIOS Type 36 - Management Device Threshold Data Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type36 implements SMBIOS Type 36 - Management Device Threshold Data Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type37
Package type37 implements SMBIOS Type 37 - Memory Channel Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type37 implements SMBIOS Type 37 - Memory Channel Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type38
Package type38 implements SMBIOS Type 38 - IPMI Device Information Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type38 implements SMBIOS Type 38 - IPMI Device Information Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type39
Package type39 implements SMBIOS Type 39 - System Power Supply Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type39 implements SMBIOS Type 39 - System Power Supply Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type4
Package type4 implements SMBIOS Type 4 - Processor Information Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type4 implements SMBIOS Type 4 - Processor Information Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type40
Package type40 implements SMBIOS Type 40 - Additional Information Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type40 implements SMBIOS Type 40 - Additional Information Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type41
Package type41 implements SMBIOS Type 41 - Onboard Devices Extended Information Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type41 implements SMBIOS Type 41 - Onboard Devices Extended Information Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type42
Package type42 implements SMBIOS Type 42 - Management Controller Host Interface Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type42 implements SMBIOS Type 42 - Management Controller Host Interface Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type43
Package type43 implements SMBIOS Type 43 - TPM Device Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type43 implements SMBIOS Type 43 - TPM Device Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type44
Package type44 implements SMBIOS Type 44 - Processor Additional Information Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type44 implements SMBIOS Type 44 - Processor Additional Information Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type45
Package type45 implements SMBIOS Type 45 - Firmware Inventory Information Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type45 implements SMBIOS Type 45 - Firmware Inventory Information Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type46
Package type46 implements SMBIOS Type 46 - String Property Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type46 implements SMBIOS Type 46 - String Property Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type5
Package type5 implements SMBIOS Type 5 - Memory Controller Information (Obsolete) Per DSP0134 SMBIOS Reference Specification 3.9.0 This structure is obsolete starting with SMBIOS 2.1 specification
|
Package type5 implements SMBIOS Type 5 - Memory Controller Information (Obsolete) Per DSP0134 SMBIOS Reference Specification 3.9.0 This structure is obsolete starting with SMBIOS 2.1 specification |
|
type6
Package type6 implements SMBIOS Type 6 - Memory Module Information (Obsolete) Per DSP0134 SMBIOS Reference Specification 3.9.0 This structure is obsolete starting with SMBIOS 2.1 specification
|
Package type6 implements SMBIOS Type 6 - Memory Module Information (Obsolete) Per DSP0134 SMBIOS Reference Specification 3.9.0 This structure is obsolete starting with SMBIOS 2.1 specification |
|
type7
Package type7 implements SMBIOS Type 7 - Cache Information Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type7 implements SMBIOS Type 7 - Cache Information Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type8
Package type8 implements SMBIOS Type 8 - Port Connector Information Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type8 implements SMBIOS Type 8 - Port Connector Information Per DSP0134 SMBIOS Reference Specification 3.9.0 |
|
type9
Package type9 implements SMBIOS Type 9 - System Slots Per DSP0134 SMBIOS Reference Specification 3.9.0
|
Package type9 implements SMBIOS Type 9 - System Slots Per DSP0134 SMBIOS Reference Specification 3.9.0 |