bloginfo

Httpd Speed Test

Oct 30th, 2012 (edited)
409
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.47 KB | None | 0 0
  1. #!/bin/bash
  2. # Copyright (C) Denis Szalkowski / Licence GPL v3
  3. # $1 : passage de l'url à partir de la ligne de commande
  4. fichier=results.csv
  5. if [ ! $1 ]
  6. then
  7.     echo "httpdspeedtest http://www.dsfc.net/"
  8.     exit
  9. fi
  10. if [ -f $fichier ]
  11. then
  12.     rm -f $fichier
  13. fi
  14. i=1
  15. while ((i<=5))
  16. do
  17.     deb=`date +%s.%N`
  18.     wget -e robots=off -p -q -U "Mozilla/5.0" -nd --delete-after $1
  19.     fin=`date +%s.%N`
  20.     echo -e "$1\t$i\t$deb\t$fin">>$fichier
  21.     i=$(expr 1 + $i)
  22. done
Add Comment
Please, Sign In to add comment