leds: ledtrig-activity: Add a system activity LED trigger
commit7df4f9a9f0667ee60b1d96c30734c8aa504d5f07
authorWilly Tarreau <w@1wt.eu>
Mon, 28 Aug 2017 18:44:51 +0000 (28 20:44 +0200)
committerJacek Anaszewski <jacek.anaszewski@gmail.com>
Fri, 6 Oct 2017 19:31:03 +0000 (6 21:31 +0200)
tree6e6157b8bc0d371451ead0db9b9727ba3ac6fc9a
parent9e66317d3c92ddaab330c125dfe9d06eee268aff
leds: ledtrig-activity: Add a system activity LED trigger

The "activity" trigger was inspired by the heartbeat one, but aims at
providing instant indication of the immediate CPU usage. Under idle
condition, it flashes 10ms every second. At 100% usage, it flashes
90ms every 100ms. The blinking frequency increases from 1 to 10 Hz
until either the load is high enough to saturate one CPU core or 50%
load is reached on a single-core system. Then past this point only the
duty cycle increases from 10 to 90%.

This results in a very visible activity reporting allowing one to
immediately tell whether a machine is under load or not, making it
quite suitable to be used in clusters.

Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
drivers/leds/trigger/Kconfig
drivers/leds/trigger/Makefile
drivers/leds/trigger/ledtrig-activity.c [new file with mode: 0644]