{"id":43808057,"url":"https://github.com/mt-inside/go-lmsensors","last_synced_at":"2026-02-05T23:04:35.160Z","repository":{"id":57568446,"uuid":"342775217","full_name":"mt-inside/go-lmsensors","owner":"mt-inside","description":"Linux hardware sensor monitoring in Go","archived":false,"fork":false,"pushed_at":"2024-02-06T11:46:58.000Z","size":51,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-14T19:39:53.898Z","etag":null,"topics":["lmsensors","sensors","temperature-monitoring","temperature-sensor"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mt-inside.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-27T05:02:47.000Z","updated_at":"2025-10-11T13:39:50.000Z","dependencies_parsed_at":"2022-08-28T07:42:33.117Z","dependency_job_id":null,"html_url":"https://github.com/mt-inside/go-lmsensors","commit_stats":null,"previous_names":["mt-inside/golmsensors"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/mt-inside/go-lmsensors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mt-inside%2Fgo-lmsensors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mt-inside%2Fgo-lmsensors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mt-inside%2Fgo-lmsensors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mt-inside%2Fgo-lmsensors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mt-inside","download_url":"https://codeload.github.com/mt-inside/go-lmsensors/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mt-inside%2Fgo-lmsensors/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29137754,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T23:02:30.544Z","status":"ssl_error","status_checked_at":"2026-02-05T23:02:24.945Z","response_time":65,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["lmsensors","sensors","temperature-monitoring","temperature-sensor"],"created_at":"2026-02-05T23:04:34.878Z","updated_at":"2026-02-05T23:04:35.145Z","avatar_url":"https://github.com/mt-inside.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-lmsensors\nLinux hardware sensor monitoring in Go.\n\n[![Checks](https://github.com/mt-inside/go-lmsensors/actions/workflows/checks.yaml/badge.svg)](https://github.com/mt-inside/go-lmsensors/actions/workflows/checks.yaml)\n[![GitHub Issues](https://img.shields.io/github/issues-raw/mt-inside/go-lmsensors)](https://github.com/mt-inside/go-lmsensors/issues)\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/mt-inside/go-lmsensors.svg)](https://pkg.go.dev/github.com/mt-inside/go-lmsensors)\n\nUses the [lm-sensors](https://github.com/lm-sensors/lm-sensors) (linux monitoring sensors) pacakge, on top of the [hwmon](https://hwmon.wiki.kernel.org) kernel feature.\n\n## Setup\n* Install _lm-sensors_\n  * Ubuntu: `sudo apt install lm-sensors libsensors-dev`\n  * Arch: `pacman -S lm_sensors`\n* Configure _lm-sensors_\n  * Run `sensors-detect`\n  * Make any [necessary adjustments](https://hwmon.wiki.kernel.org/faq) to the [configuration](https://linux.die.net/man/5/sensors3.conf) in `/etc/sensors3.conf`, using `/etc/sensors.d/*`\n* `go get github.com/mt-inside/go-lmsensors`\n\n## How it works\nThis module links against the C-language `libsensors` and calls it to get sensor readings from the hwmon kernel subsystem (which it reads from sysfs).\n\nMy original version ran and parsed `sensors -j`, as all the information is in that JSON if you really squint and know how to read it.\nHowever, using the library direct seemed faster, avoids a fork(), and doesn't require `lm-sensors` to be installed, just `libsensors5` (some package managers have them separately). (The instructions say to install lm-sensors, becuase you almost certainly want to run `sensors-detect`.)\n\nThe hwmon data _are_ exposed through sysfs, but those are raw values - libsensors isn't just a convenience binding; it scales raw values according to a big built-in database, and lets the user rename sensors.\n\n## Example\n\n### Code\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\n\t\"github.com/mt-inside/go-lmsensors\"\n)\n\nfunc main() {\n\tsensors, err := golmsensors.Get(true, true)\n\tif err != nil {\n\t\tlog.Fatalf(\"Can't get sensor readings: %v\", err)\n\t}\n\n\tfor _, chip := range sensors.ChipsList {\n\t\tfmt.Println(chip.ID)\n\t\tfor _, reading := range chip.SensorsList {\n\t\t\tfmt.Printf(\"  [%s] %s: %s\\n\", reading.SensorType, reading.Name, reading.Value)\n\t\t}\n\t}\n}\n```\n\n### Output\n```\nit8792-isa-0a60\n  [In] PM_CLDO12: 1.504000\n  [Fan] SYS_FAN4: 0.000000\n  [In] VIN0: 1.788000\n  [In] DDR VTT: 0.665000\n  [In] Chipset Core: 1.090000\n  [In] six: 2.780000\n  [Temp] PCIEX4_1: 37.000000\n  [Temp] System2: 34.000000\n...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmt-inside%2Fgo-lmsensors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmt-inside%2Fgo-lmsensors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmt-inside%2Fgo-lmsensors/lists"}