Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add iPerf Speed Test to dashboards #926

Merged
merged 3 commits into from
Apr 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}'