Gpio-fan-rpm cli tool

Hi there,

Maybe someone else have such a special request to read out the RPM from a fan with a GPIO pin. If so here you have a simple cli tool which works with OpenWRT 24.10 and 23.05.

Features

  • High Precision: Event-driven timerfd timing with ±1 RPM accuracy for stable fans
  • Cross-version: Works with libgpiod v1 (OpenWRT 23.05) and v2 (24.10)
  • Multiple Formats: Human-readable, JSON, numeric, and collectd output
  • Watch Mode: Continuous monitoring with graceful quit (press 'q')
  • Multi-GPIO: Parallel measurement of multiple fans simultaneously
  • Efficient: Event-driven design, minimal CPU and memory usage
3 Likes