Using the blue LED on the SheevaPlug

As mentioned here, it is possible to control the blue LED on the Plug and use it for notification.
The LED itself is accessible as /sys/class/leds/plug\:green\:health, and as mentioned in the Linux LED Documentation, it is possible to find out the available LED functions (triggers) through:
~# cat /sys/class/leds/plug\:green\:health/trigger
none nand-disk mmc0 timer heartbeat [default-on]
Thus, if you want a heartbeat effect, you would issue the command:
echo "heartbeat" > /sys/class/leds/plug\:green\:health/trigger
Now, on the more useful side, with a default Linux image running on the NAND flash, you might want to enable "nand-disk" to monitor said flash activity. Please be aware however that the LED behaviour in this case is quite different from your run-of-the-mill HDD access activity (which is a good thing - the less actual access to the NAND, the less wear and tear). In short, UBIFS does its job and reduces NAND accesses to the bare minimum, which in turn results in little NAND activity actually going on. A couple of well placed "sync" should suffice to convince you that "nand-disk" works as expected though.

If you're using the default Ubuntu running on the NAND Flash, you probably want to add the following to your /etc/rc.local then:
echo "nand-disk" > /sys/class/leds/plug\:green\:health/trigger

No comments:

Post a Comment

Note: only a member of this blog may post a comment.