aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/aoe/status.sh
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/aoe/status.sh')
-rw-r--r--Documentation/aoe/status.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/Documentation/aoe/status.sh b/Documentation/aoe/status.sh
new file mode 100644
index 00000000000000..7b8c8a7f8bd6f6
--- /dev/null
+++ b/Documentation/aoe/status.sh
@@ -0,0 +1,15 @@
+# collate and present sysfs information about AoE storage
+
+set -e
+format="%8s\t%12s\t%8s\t%8s\n"
+
+printf "$format" device mac netif state
+
+for d in `ls -d /sys/block/etherd* | grep -v p`; do
+ dev=`echo "$d" | sed 's/.*!//'`
+ printf "$format" \
+ "$dev" \
+ "`cat \"$d/mac\"`" \
+ "`cat \"$d/netif\"`" \
+ "`cat \"$d/state\"`"
+done | sort