Anuket Project

Requirement

1.0

Retrieval of SMBIOS data including: vendor, version, release date and BIOS revision


2.0

Store data in plugin using static variable


3.0

Plugin serves a simple server using libmicrohttpd on configurable port


4.0

Return stored data on HTTP get request in json format


5.0

Collection Interval should be configurable



Overview

Retrieval of BIOS information is part of Platform Awareness of Service Assurance. The goal of this equivalence feature is to expose the BIOS feature/information to higher level management applications.

The System Management BIOS (SMBIOS) specification defines data structures/tables that can be used to read information stored in the BIOS.

The data is structures are categorized into types (DMI types), for example:

  • BIOS information: 0
  • System information: 1
  • Cache information: 7

An example of the BIOS structure and initial information identified is shown below as an output using dmidecode:

Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
        Vendor: American Megatrends Inc.
        Version: F12
        Release Date: 01/29/2015
        Address: 0xF0000
        Runtime Size: 64 kB
        ROM Size: 16384 kB
        Characteristics:
                PCI is supported
                BIOS is upgradeable
                BIOS shadowing is allowed
                Boot from CD is supported
                Selectable boot is supported
                BIOS ROM is socketed
                EDD is supported
                5.25"/1.2 MB floppy services are supported (int 13h)
                3.5"/720 kB floppy services are supported (int 13h)
                3.5"/2.88 MB floppy services are supported (int 13h)
                Print screen service is supported (int 5h)
                8042 keyboard services are supported (int 9h)
                Serial services are supported (int 14h)
                Printer services are supported (int 17h)
                ACPI is supported
                USB legacy is supported
                BIOS boot specification is supported
                Targeted content distribution is supported
                UEFI is supported
        BIOS Revision: 5.6


Click here for example of full SMBIOS decode output.

Types read by plugin

The plugin get information from pre-selected number of DMI types:

  • BIOS - 0
  • System - 1
  • Baseboard - 2
  • Processor - 4
  • Cache - 7
  • Physical Memory Array - 16
  • Memory Device - 17
  • IPMI Device - 38
  • Onboard Devices Extended Information - 41

Design

Introduction

BIOS information and other SMBIOS structures are stored in DMI (Desktop Management Interface) table. Unfortunately, table’s content is not stored in human-readable format, thus it has to be decoded. Implementing a dedicated DMI decoder can be quite difficult and time-consuming, therefore it was decided to leverage one of existing tools. Since SMBIOS information cannot change without a reboot it is possible to read it just once and store it in plugin as static data. The purpose of Capabilities feature is to provide easy-to-use utility functions leveraging existing DMI decoder and extend collectd global variables with BIOS information. At first, the only DMI decoder will be dmidecode. The purpose of Capabilities feature is to provide static platform data to end-user leveraging existing DMI decoder. At first, the only source of data will be dmidecode.

Dmidecode utility

dmidecode is a standard Linux tool used for dumping a computer's DMI (SMBIOS) table contents in a human-readable format. It provides a description of a systems hardware components, as well as other useful pieces of information such as serial numbers and BIOS revision. Thanks to this table, you can retrieve information without having to probe for the actual hardware. While this is a good point in terms of report speed and safeness, this also makes the presented information possibly unreliable. dmidecode does not provide a library, thus the implementation will have to use popen system call. The command to read given type of DMI information has a syntax: 'dmidecode -t <type_num>'.

Libmicrohttpd

It is a small c library that make it possible to embed an HTTP server as part of another application. GNU Libmicrohttpd is free software and part of the GNU project. Capabilities plugin leverages the library to expose collected data through micro embedded webserver. The header content type is set to "application/json".

Plugin

The design of choice for plugin is hybrid solution using libmicrohttpd. Hybrid means that it both collects data and expose it to external users through simple httpd server. Plugin reads available static data at init phase and stores it in internal static structure. Plugin serves a simple server using libmicrohttpd on configurable port, it returns data in json format on every get request. Due to static nature of the data collected, there are no metrics or events to be sent from plugin.


Output formatting

The data is to be formatted using json for easier processing on client side. An example of returned data is shown below.

# curl 127.0.0.1:9104

{"BIOS":[{"BIOS Information":{"Vendor":"Intel Corporation","Version":"SE5C620.86B.00.01.0013.030920180427","Release Date":"03/09/2018","Address":"0xF0000","Runtime Size":"64 kB","ROM Size":"4096kB","Characteristics":["PCI is supported","PNP is supported","BIOS is upgradeable","BIOS shadowing is allowed","Boot from CD is supported","Selectable boot is supported","EDD is supported","5.25\"/1.2 MB floppy services are supported (int 13h)","3.5\"/720 kB floppy services are supported (int 13h)","3.5\"/2.88 MB floppy services are supported (int 13h)","Print screen service is supported (int 5h)","8042 keyboard services are supported (int 9h)","Serial services are supported (int 14h)","Printer services are supported (int 17h)","CGA/mono video services are supported (int 10h)","ACPI is supported","USB legacy is supported","LS-120 boot is supported","ATAPI Zip drive boot is supported","BIOS boot specification is supported","Function key-initiated network boot is supported","Targeted content distribution is supported","UEFI is supported"],"BIOS Revision":"0.0","Firmware Revision":"0.0"}}]}

Considerations

Configuration Considerations

<Plugin capabilities>

               Host “localhost”

               Port “9104”

</Plugin>

Configuration options include:

Host <hostname>

Optional. Bind to the given hostname. By default, the plugin will bind to the "any" address, i.e. accept packets sent to any of the hosts addresses. This option is supported only for libmicrohttpd newer than 0.9.0.

Port <port number>

Optional. Port the embedded webserver should listen on. If not provided, the default port number will be used (9104).

Deployment Considerations

API/GUI/CLI Considerations

Equivalence Considerations

Security Considerations

Alarms, events, statistics considerations

Redundancy Considerations

Performance Considerations

Not part of Telemetry so performance is Not Applicable.

Testing Consideration

Other Considerations


Impact

The following table outlines possible impact(s) the deployment of this deliverable may have on the current system.


Ref

System Impact Description

Recommendation / Comments

1

The plugin creates http micro server that listens on configured port.


Key Assumptions

The following assumptions apply to the scope specified in this document.


Ref

Assumption

Status

1



Key Exclusions

The following exclusions apply to the scope discussed in this document.


Ref

Exclusion

Status

1



Key Dependencies

The following table outlines the key dependencies associated with this deliverable.


Ref

Dependency

Status

1

dmidecode


2

libmicrohttpd


3

jansson library


Issues List

None. 

  • No labels