aboutsummaryrefslogtreecommitdiffstats
path: root/usbhub.conf
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--usbhub.conf50
1 files changed, 45 insertions, 5 deletions
diff --git a/usbhub.conf b/usbhub.conf
index 0d9e8ad..f1ec71e 100644
--- a/usbhub.conf
+++ b/usbhub.conf
@@ -1,7 +1,7 @@
Variables {
- tick 500
- tack 100
- minute 60000
+ tick 50
+ netstep 0.5
+ diskstep 1.5
}
Display SitecomHUB {
@@ -38,6 +38,39 @@ Widget GPO_Test600 {
update 600
}
+
+# Display network activity as pulse duration on the hub leds.
+# currently configured to
+#
+# 0 % pulse width : traffic < exp(10) == 22kbyte/sec
+# 50 % pulse width : traffic about exp(13.5) == 730kbyte/sec
+# 100 % pulse width : traffic > exp(16) == 8886kbyte/sec
+#
+# Which is quite suitable for a 100mbit network.
+
+Widget Net_RX {
+ class 'GPO'
+ expression (exp(10+test::bar(1,6,0,0.5)) < netdev('eth0', 'Rx_bytes', (6/netstep)*2*tick))?2:3
+ update tick
+}
+Widget Net_TX {
+ class 'GPO'
+ expression (exp(10+test::bar(2,6,0,0.5)) < netdev('eth0', 'Tx_bytes', (6/netstep)*2*tick))?2:3
+ update tick
+}
+
+# As above, but for disk read/writes, pwm for 0bytes/sec .. 33MB/sec (e^9 * 4096)
+Widget SDA_read {
+ class 'GPO'
+ expression (exp(test::bar(3,9,0,diskstep)) < diskstats('sda', 'read_sectors', (9/diskstep)*2*tick))?2:3
+ update tick
+}
+Widget SDA_write{
+ class 'GPO'
+ expression (exp(test::bar(4,9,0,diskstep)) < diskstats('sda', 'write_sectors', (9/diskstep)*2*tick))?2:3
+ update tick
+}
+
Layout TestHUB {
GPO1 'GPO_Test300'
GPO2 'GPO_Test400'
@@ -45,7 +78,14 @@ Layout TestHUB {
GPO4 'GPO_Test600'
}
+Layout NetAndHDD {
+ GPO1 'Net_RX'
+ GPO2 'Net_TX'
+ GPO3 'SDA_read'
+ GPO4 'SDA_write'
+}
+
#Display 'SitecomHUB'
Display 'TyphoonHUB'
-Layout 'TestHUB'
-
+#Layout 'TestHUB'
+Layout 'NetAndHDD'