Skip to content

Instantly share code, notes, and snippets.

@bradleygolden
Last active December 2, 2015 05:06
Show Gist options
  • Select an option

  • Save bradleygolden/7af5b0ce087a0d36a219 to your computer and use it in GitHub Desktop.

Select an option

Save bradleygolden/7af5b0ce087a0d36a219 to your computer and use it in GitHub Desktop.
A basic script to test whether a server can withstand a series of requests or not.
#!/bin/bash
#run using $ bash 10000 (or any other number you choose)
#change the url to the url where your server is serving files
#run in multiple terminal sessions to force simulatenous requests
n=$1
j=0
i=0
while [ $i -lt $n ]; do
#wget -q http://localhost:8888/index.html
curl -O -s http://localhost:8888/index.html
let i=i+1;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment