by Obihoernchen » Thu Jan 31, 2013 3:32 am
I've made a systemd service to autostart this blink action
The quote is for PogoplugV2 users only!$this->bbcode_second_pass_quote('', 'T')his is for
PogoplugV2 with correct arcNumber.
If your arcNumber is wrong (orange LED on) then you should fix it:
$this->bbcode_second_pass_code('', 'pacman -S uboot-env
fw_setenv arcNumber 3542
fw_setenv machid dd6
reboot')
I've increased the iostat interval from 1s to 3s because I think that's enough and it will reduce load.
You need iostat so install sysstat:
$this->bbcode_second_pass_code('', 'pacman -S sysstat')
Create a new file called
/usr/lib/systemd/system/blinkled.service$this->bbcode_second_pass_code('', '[Unit]
Description=Blink LED if hard drive is active daemon
[Service]
Type=oneshot
ExecStart=/usr/local/bin/blinkled
ExecStop=/usr/bin/killall iostat
RemainAfterExit=true
[Install]
WantedBy=multi-user.target')
And another one called
/usr/local/bin/blinkled$this->bbcode_second_pass_code('', '#!/bin/bash
/usr/bin/iostat -z -d 3 sda | /usr/bin/sed -u -e '1d' -e 's/Device.*/none/' -e 's/sd.*/heartbeat/' -e '/^$/d' > /sys/class/leds/status\:orange\:fault/trigger &')
Make executable:
$this->bbcode_second_pass_code('', 'chmod u+x /usr/local/bin/blinkled')
Now you can use systemctl to control this service
To enable:
$this->bbcode_second_pass_code('', 'systemctl enable blinkled.service')
To start:
$this->bbcode_second_pass_code('', 'systemctl start blinkled')
Hope you like it!
btw: arch linux is great!
I'm able to get ~19MB/s read and 11MB/s write via Samba
NTFS with some mount and TCP tuning and 3.7.5 Kernel
More than twice as fast as stock