{"id":28578308,"url":"https://github.com/digitalocean/go-smbios","last_synced_at":"2025-06-11T01:09:31.988Z","repository":{"id":43932792,"uuid":"110138172","full_name":"digitalocean/go-smbios","owner":"digitalocean","description":"Package smbios provides detection and access to System Management BIOS (SMBIOS) and Desktop Management Interface (DMI) data and structures.  Apache 2.0 Licensed.","archived":false,"fork":false,"pushed_at":"2023-03-31T03:45:35.000Z","size":54,"stargazers_count":166,"open_issues_count":3,"forks_count":51,"subscribers_count":115,"default_branch":"master","last_synced_at":"2025-01-15T00:19:53.706Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://en.wikipedia.org/wiki/System_Management_BIOS","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/digitalocean.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-09T16:18:38.000Z","updated_at":"2024-12-30T03:53:31.000Z","dependencies_parsed_at":"2024-06-18T12:38:59.691Z","dependency_job_id":"4fbdb3b3-5b19-4dcf-aa6b-1b3afc4b1475","html_url":"https://github.com/digitalocean/go-smbios","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fgo-smbios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fgo-smbios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fgo-smbios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fgo-smbios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digitalocean","download_url":"https://codeload.github.com/digitalocean/go-smbios/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fgo-smbios/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259178542,"owners_count":22817388,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-11T01:09:30.569Z","updated_at":"2025-06-11T01:09:31.965Z","avatar_url":"https://github.com/digitalocean.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"go-smbios [![Build Status](https://travis-ci.org/digitalocean/go-smbios.svg?branch=master)](https://travis-ci.org/digitalocean/go-smbios) [![GoDoc](https://godoc.org/github.com/digitalocean/go-smbios/smbios?status.svg)](https://godoc.org/github.com/digitalocean/go-smbios/smbios) [![Go Report Card](https://goreportcard.com/badge/github.com/digitalocean/go-smbios)](https://goreportcard.com/report/github.com/digitalocean/go-smbios)\n=========\n\nPackage `smbios` provides detection and access to System Management BIOS (SMBIOS)\nand Desktop Management Interface (DMI) data and structures.  Apache 2.0 Licensed.\n\nIntroduction\n------------\n\n[SMBIOS](https://en.wikipedia.org/wiki/System_Management_BIOS) is a standard\nmechanism for fetching BIOS and hardware information from within an operating\nsystem.  It shares some similarities with the older DMI standard, and the two are\noften confused.\n\nTo install this package, run:\n\n```\n$ go get github.com/digitalocean/go-smbios/smbios\n```\n\nThis package is based on the [SMBIOS 3.1.1 specification](https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.1.1.pdf),\nbut should work with SMBIOS 2.0 and above.\n\nIn general, it's up to hardware manufacturers to properly populate SMBIOS data,\nand many structures may not be populated correctly or at all; especially on\nconsumer hardware.\n\nThe `smbios.Structure` types created by this package can be decoded using the\nstructure information in the SMBIOS specification.  In the future, some common\nstructures may be parsed and readily available by using this package.\n\nSupported operating systems and their SMBIOS retrieval mechanisms include:\n\n- DragonFlyBSD (/dev/mem)\n- FreeBSD (/dev/mem)\n- Linux (sysfs and /dev/mem)\n- NetBSD (/dev/mem)\n- OpenBSD (/dev/mem)\n- Solaris (/dev/mem)\n- Windows (GetSystemFirmwareTable)\n\nAt this time, macOS is not supported, as it does not expose\nSMBIOS information in the same way as the supported operating systems. Pull\nrequests are welcome to add support for additional operating systems.\n\nExample\n-------\n\nSee `cmd/lssmbios` for a runnable example.  Note that retrieving SMBIOS\ninformation is a privileged operation.  On Linux, you may invoke the binary\nas root directly, or apply the `CAP_DAC_OVERRIDE` capability to enable reading\nthe information without superuser access.\n\nHere's the gist of it:\n\n```go\n// Find SMBIOS data in operating system-specific location.\nrc, ep, err := smbios.Stream()\nif err != nil {\n\tlog.Fatalf(\"failed to open stream: %v\", err)\n}\n// Be sure to close the stream!\ndefer rc.Close()\n\n// Decode SMBIOS structures from the stream.\nd := smbios.NewDecoder(rc)\nss, err := d.Decode()\nif err != nil {\n\tlog.Fatalf(\"failed to decode structures: %v\", err)\n}\n\n// Determine SMBIOS version and table location from entry point.\nmajor, minor, rev := ep.Version()\naddr, size := ep.Table()\n\nfmt.Printf(\"SMBIOS %d.%d.%d - table: address: %#x, size: %d\\n\",\n\tmajor, minor, rev, addr, size)\n\nfor _, s := range ss {\n\tfmt.Println(s)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalocean%2Fgo-smbios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigitalocean%2Fgo-smbios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalocean%2Fgo-smbios/lists"}