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 1 commit
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
29 changes: 29 additions & 0 deletions commands/dashboards/iperf-speed-test.sh
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on our guidelines, you need to rename this file to include .template in it, for example: iperf-speed-test.template.sh.

Copy link
Contributor Author

@Samywamy10 Samywamy10 Apr 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I read that, but then I saw other files that don't use this naming convention so wasn't sure

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File that demands an extra configuration without .template in the name is a mistake, we are going to fix it, thanks for sharing it though.

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/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 iPerf Speed Test
Samywamy10 marked this conversation as resolved.
Show resolved Hide resolved
# @raycast.mode inline
# @raycast.refreshTime 1h

Samywamy10 marked this conversation as resolved.
Show resolved Hide resolved
# Optional parameters:
# @raycast.icon 💾

# Documentation:
# @raycast.description Runs an iPerf speed test.
Samywamy10 marked this conversation as resolved.
Show resolved Hide resolved
# @raycast.author samywamy10
Samywamy10 marked this conversation as resolved.
Show resolved Hide resolved
# @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}'