Skip to content

Commit

Permalink
Add iPerf Speed Test to dashboards (raycast#926)
Browse files Browse the repository at this point in the history
* Add iPerf Speed Test to dashboards

* Add suggestions from unnamedd

Co-authored-by: Thiago Holanda <unnamedd@gmail.com>

* Rename iperf-speed-test.sh to iperf-speed-test.template.sh

---------

Co-authored-by: Thiago Holanda <unnamedd@gmail.com>
  • Loading branch information
2 people authored and Hyper Focus committed Aug 6, 2024
1 parent 5d65b3e commit 23a9fe3
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions commands/dashboards/iperf-speed-test.template.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

# Dependency: This script requires `iPerf` to be installed: https://iperf.fr/iperf-download.php
# Install via homebrew: `brew install iperf`

# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Speed Test
# @raycast.mode inline
# @raycast.refreshTime 1h
# @raycast.packageName iPerf

# Optional parameters:
# @raycast.icon 💾

# Documentation:
# @raycast.description Runs an iPerf Speed Test.
# @raycast.author Sam Wright
# @raycast.authorURL https://raycast.com/samywamy10

# Add the IP address of your iPerf server here
ip_address='192.168.86.44'

if ! command -v iperf &> /dev/null; then
echo "iperf command is required ('brew install iperf' or https://iperf.fr/iperf-download.php).";
exit 1;
fi

{ iperf3 -c $ip_address | grep 'sender' | tail -n 1 | awk '{print $7 " " $8}' && date +'%-I:%M%p'; } | tr '\n' ' ' | awk '{$3="@ "$3; print $0}'

0 comments on commit 23a9fe3

Please sign in to comment.