Your comment got me curious: apparently Linux controls LEDs activity through /sys/class/led [0]
A cursory search led me to this project[1] that blinks the power led according to the disk activity, which is not far from your idea (replacing the disk activity by a composite of system load for instance?)
Isn’t there already a disk activity led? Well, on desktop boxes anyway.
Eons ago I had a small program on Linux that blinked the otherwise-almost-useless scroll/numlock leds based on network i/o activity. It was fairly cool.
Reminds me of the book Cryptonomicon by Neal Stephenson, where the character writes some code to redirect stdout to blink the num/scroll/capslock status LEDs in Morse code.
The project I mentionned above was started by someone who did not have such a led on their laptop
I just looked at several severs I have access to at several operators, different physical hardware and distros, none of them has a LED defined for anything other than scroll/numlock
I guess you're referring to CPU Trigger led activity as defined by [0]?
As I said elsewhere, none of the (recent) servers I have access to, most of them Intel based, several distros, etc have anything else than LEDs defined for numlock/scrolllock under /sys/class/leds/, where I'd expect to find the CPU activity LED? What am I missing here?
There is a file in that directory for each physical led on your computer. You echo in the name of the "driver" for that LED (disk, cpu, heartbeat, whatever) and that physical LED becomes what the driver wants it to show.
So if numlock and scroll lock are the LEDs available on your hardware, you can repurpose one of those as the CPU activity LED.
A cursory search led me to this project[1] that blinks the power led according to the disk activity, which is not far from your idea (replacing the disk activity by a composite of system load for instance?)
[0]https://www.kernel.org/doc/Documentation/leds/leds-class.txt [1]https://github.com/fabio-d/block-led-trigger