I use a lot of Raspberry Pis (4B, 3B, 3A, Zero W, etc) and I use them mostly headless. And while I do have a monitoring setup, I always thought that it would be nicer if I could map the default LEDs to something more useful. And guess what, it is really easy and really powerful!
The first one was the easiest and most powerful. I use a Pi4 with OpenWRT, and in it we've a simple Luci GUI to manage it. Have a look here:
On all the rest of them, I used the configuration editing
/boot/config.txt and append following:
[all] dtparam=act_led_trigger=heartbeat dtparam=pwr_led_trigger=timer
This gives me some funky LED display from my cluster. You can read more about these options here. You can see
heartbeat as the selected mode.
cat /sys/class/leds/ACT/trigger none rc-feedback kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock timer oneshot [heartbeat] backlight gpio cpu cpu0 cpu1 cpu2 cpu3 default-on input panic actpwr mmc1 mmc0 rfkill-any rfkill-none rfkill0 rfkill1