Skip to content

Instantly share code, notes, and snippets.

@avar
Created January 28, 2012 18:33
Show Gist options
  • Save avar/1695366 to your computer and use it in GitHub Desktop.
Save avar/1695366 to your computer and use it in GitHub Desktop.
Basic speedtest.net replacement
#!/bin/sh
cd /tmp
# dd if=/dev/urandom of=100mb-random-file bs=1024 count=$((100*1024))
rm 100mb-random-file
echo "Downloading 100MB from w"
time rsync --rsh=ssh --append --archive --no-group --human-readable --progress w:/tmp/100mb-random-file .
echo "Uploading a 10MB file to w"
ssh w "rm /tmp/10mb-random-file"
# dd if=/dev/urandom of=100mb-random-file bs=1024 count=$((100*1024))
time rsync --rsh=ssh --append --archive --no-group --human-readable --progress 10mb-random-file w:/tmp/
echo "Pinging w"
ping -c 10 w
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment