General NAS-Central Forums

Welcome to the NAS community
It is currently Wed Jun 28, 2017 10:41 am

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: LED triggers
PostPosted: Wed Feb 20, 2013 7:12 pm 
Offline

Joined: Sat May 29, 2010 6:37 pm
Posts: 160
Hey,

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:
 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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group