LED triggers

Ethernet disk mini v2
Post Reply
Posts: 160
Joined: Sat May 29, 2010 6:37 pm

LED triggers

Post by langerak » Wed Feb 20, 2013 7:12 pm


I currently have the 3.7.9 kernel running on the EDMini and started playing with the GPIO LED a bit. I found this command which stats iostat every second and when there is io, the led flashes (according to trigger events supported) and stays dark if there is no io:

Code: Select all

 iostat -z -d 1 sda | sed -u -e '1d' -e 's/Device.*/none/' -e 's/sd.*/timer/' -e '/^$/d' > /sys/class/leds/power\:blue/trigger &
In the /sys/class/leds/power:blue/ directory is also a delay_on / delay_off for the timer trigger, but how can I set these values in the above command, so that they will be set to, let's say 100ms, by default it's 500ms for both files and cannot be updated because iostat rewrites them every second. So I must manage a way to set these values within the command, but am not sure how I should accomplish this, any thougths?

Also, how can the LED trigger be set upon boot? When the kernel boots, the LED dims, but is it also possible to set some trigger during boot?

Post Reply