Documentation
¶
Index ¶
- Constants
- type DMI
- func (d *DMI) ExecDmidecode(binary string) (string, error)
- func (d *DMI) FindBin(binary string) (string, error)
- func (d *DMI) GenericSearchBy(param, value string) ([]Record, error)
- func (d *DMI) ParseDmidecode(output string) error
- func (d *DMI) Run() error
- func (d *DMI) SearchByDMIType(id DMIType) ([]Record, error)
- func (d *DMI) SearchByName(name string) ([]Record, error)
- func (d *DMI) SearchByType(id int) ([]Record, error)
- type DMIType
- type Record
Constants ¶
View Source
const (
DMIDecodeBinary = "dmidecode"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DMI ¶
func (*DMI) ExecDmidecode ¶
ExecDmiDecode will attempt to execute a given binary, capture its output and return it (or an any errors it encounters)
func (*DMI) GenericSearchBy ¶
GenericSearchBy will search for any param w/ value in the d.Data map.
func (*DMI) ParseDmidecode ¶
ParseDmiDecode will attempt to parse dmidecode output and place all matching content in d.Data.
func (*DMI) Run ¶
Run will attempt to find a a valid `dmidecode` bin, attempt to execute it and parse whatever data it gets.
func (*DMI) SearchByDMIType ¶
SearchByType will search for a specific DMI record by its type in d.Data
func (*DMI) SearchByName ¶
SearchByName will search for a specific DMI record by name in d.Data
type DMIType ¶
type DMIType int
const ( DMITypeUnknown DMIType = iota DMITypeSystem DMITypeBaseBoard DMITypeChassis DMITypeProcessor DMITypeMemoryController DMITypeMemoryModule DMITypeCache DMITypePortConnector DMITypeSystemSlots DMITypeOnBoardDevices DMITypeOEMStrings DMITypeSystemConfigurationOptions DMITypeBIOSLanguage DMITypeGroupAssociations DMITypeSystemEventLog DMITypePhysicalMemoryArray DMITypeMemoryDevice DMIType32MemoryError DMITypeMemoryArrayMappedAddress DMITypeMemoryDeviceMappedAddress DMITypeBuiltInPointingDevice DMITypePortableBattery DMITypeSystemReset DMITypeHardwareSecurity DMITypeSystemPowerControls DMITypeVoltageProbe DMITypeCoolingDevice DMITypeTemperatureProbe DMITypeElectricalCurrentProbe DMITypeOutOfBandRemoteAccess DMITypeBootIntegrityServices DMITypeSystemBoot DMIType64BitMemoryError DMITypeManagementDevice DMITypeManagementDeviceComponent DMITypeManagementDeviceThresholdData DMITypeMemoryChannel DMITypeIPMIDevice DMITypePowerSupply DMITypeAdditionalInformation DMITypeOnboardDevice )
Click to show internal directories.
Click to hide internal directories.