summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorache <ache@ache.one>2023-09-07 16:26:38 +0200
committerache <ache@ache.one>2023-09-07 16:26:38 +0200
commit80e8939ca125ee38b140bcf8ad4c06e397adb2c3 (patch)
treeda8cd2d24b5f681bf96125884e576f7d69bebe31 /functions
parentAdd function to monitor curl time (diff)
Link speed monitor
Diffstat (limited to 'functions')
-rw-r--r--functions/lksp.fish10
1 files changed, 10 insertions, 0 deletions
diff --git a/functions/lksp.fish b/functions/lksp.fish
new file mode 100644
index 0000000..50bf30e
--- /dev/null
+++ b/functions/lksp.fish
@@ -0,0 +1,10 @@
+# Compute link speed of every interfaces
+function lksp
+ for link in /sys/class/net/*
+ if cat $link/speed 2> /dev/null 1>&2
+ echo (basename $link)": " (cat $link/speed) "Mb/s"
+ else
+ echo (basename $link)": - Mb/s"
+ end
+ end
+end