gitwtfhub

wtf is sensors?

eternal-flame-ad/sensors — explained in plain English

Analysis updated 2026-07-19 · repo last pushed 2024-04-21

HaskellAudience · developerComplexity · 3/5DormantSetup · moderate

TL;DR

A Haskell library and command-line tool that reads hardware sensor data like CPU and GPU temperatures on Linux, with live monitoring output as JSON and an optional desktop status bar plugin.

Mindmap

mindmap
  root((repo))
    What it does
      Reads CPU temps
      Reads GPU temps
      JSON output
    Backends
      lm_sensors
      nvidia-smi
      hwmon planned
      Windows planned
    CLI modes
      Dump snapshot
      Monitor polling
    Integrations
      Xmobar plugin
      Color-coded warnings
    Audience
      Linux power users
      Haskell developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Log CPU and GPU temperatures to a file by piping the JSON output of monitor mode.

REASON 2

Display live CPU temperature with color-coded warnings on your Linux desktop using the Xmobar plugin.

REASON 3

Build a custom hardware monitoring dashboard in Haskell using the reusable sensor-reading library.

REASON 4

Take a one-time snapshot of all sensor readings for quick diagnostics using dump mode.

What's in the stack?

Haskelllm_sensorsnvidia-smiXmobar

How it stacks up

eternal-flame-ad/sensorsbobymicroby/boby-alga-toolkitcab404/ron
LanguageHaskellHaskellHaskell
Last pushed2024-04-212021-02-102021-08-17
MaintenanceDormantDormantDormant
Setup difficultymoderateeasymoderate
Complexity3/52/54/5
Audiencedeveloperpm founderdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires lm_sensors or nvidia-smi installed on a Linux system and comfort reading Haskell source code since full library docs are not yet written.

The license terms are not mentioned in the README, so what you can and cannot do with this code is unclear.

Wtf does this do

Sensors is a Haskell library that lets you read hardware sensor data, things like CPU temperature, GPU temperature, and power usage, from your computer. It provides both a reusable library for developers and a command-line tool for anyone who wants to check or monitor what their hardware is doing. At its core, the library talks to different "backends" that know how to query specific hardware sources. Right now it supports two: lm_sensors, which reads Linux hardware sensors like CPU temps, and nvidia-smi, which pulls data from NVIDIA graphics cards. You can use the command-line tool in two modes: a "dump" mode that takes a one-time snapshot of all sensor readings, and a "monitor" mode that continuously polls sensors at a set interval and outputs the data as JSON. There's also an optional plugin for Xmobar, a Linux status bar tool, so you can display live sensor readings, like your CPU temp in red when it gets too hot, right on your desktop. The primary audience is Linux power users and developers who already use Haskell and want to build monitoring tools or dashboards. A practical use case would be someone running a server or workstation who wants to keep an eye on temperatures and GPU utilization, either through a script that logs the JSON output or through a status bar that shows live readings with color-coded warnings when things get hot. The Xmobar plugin example in the README shows a setup where CPU temps above 85°C turn red and below 40°C stay green. The project is still a work in progress. Two additional backends are planned but not yet built: hwmon (another Linux sensor interface) and Windows support via the Windows API. The README also notes that full library documentation is still pending, pointing readers to the source code and the CLI implementation for now. This means it's best suited for someone comfortable digging into Haskell code rather than expecting polished, beginner-friendly docs.

Yoink these prompts

Prompt 1
Help me install the sensors Haskell library and run the command-line tool in dump mode to see a one-time snapshot of my CPU and GPU temperatures.
Prompt 2
Show me how to use the sensors CLI in monitor mode to continuously poll my hardware sensors every 5 seconds and output the readings as JSON to a log file.
Prompt 3
Walk me through setting up the Xmobar plugin from the sensors library so my CPU temperature shows green below 40C and red above 85C on my Linux status bar.
Prompt 4
Help me use the sensors Haskell library in my own Haskell project to read NVIDIA GPU temperature and power usage from the nvidia-smi backend.

Frequently asked questions

wtf is sensors?

A Haskell library and command-line tool that reads hardware sensor data like CPU and GPU temperatures on Linux, with live monitoring output as JSON and an optional desktop status bar plugin.

What language is sensors written in?

Mainly Haskell. The stack also includes Haskell, lm_sensors, nvidia-smi.

Is sensors actively maintained?

Dormant — no commits in 2+ years (last push 2024-04-21).

What license does sensors use?

The license terms are not mentioned in the README, so what you can and cannot do with this code is unclear.

How hard is sensors to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is sensors for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.