#!/bin/bash # # VIVILPROJECT SPEEDTEST UNIX SCRIPT VERSION v 1.0 beta 7 # # (c) sebastien@willemijns.com # # under GPL licence # sous licence GPL # # # B E T A V E R S I O N !!!!! # B E T A V E R S I O N !!!!! # B E T A V E R S I O N !!!!! # B E T A V E R S I O N !!!!! # B E T A V E R S I O N !!!!! # B E T A V E R S I O N !!!!! # B E T A V E R S I O N !!!!! # B E T A V E R S I O N !!!!! # # **************************** [English] ******************************* # # This script has been successfully tested on KNOPPIX LiveCD... because # core OS is the same, it works well too in UBUNTU and DEBIAN ;) # # * MANDRIVA (ONE AND 2007 FREE): works with some small changes and hack # (i.e using wget to DL this file and manually install RPM for LiveCD) # in all case, mandriva is not supported by the author... # # * SUSE / FEDORA / GENTOO / FREEBSD: not tested # # Quick run for KNOPPIX , UBUNTU and DEBIAN: # ===== === === ======= = ====== === ======= # # PRELUDE: Your PC memory must be greater than 512 Mo if your are in ADSL2+ # or FTTH to see the result because memory is a crucial element for this kind # of test also in LiveCD mode... # # Place this script in the LiveCD Desktop and launch it into a terminal... # # WAIT 3 MINUTES AND SEE THE RESULT !!!! # # # # # # ****************************** [Fran‡ais] ******************************** # # Ce script a ete teste avec succes sur KAELLA et KNOPPIX... par # analogie, la compatibilite avec DEBIAN et UBUNTU est assure... # # * MANDRIVA (ONE AND 2007 FREE): fonctionne avec quelques petites modifs # (du style pomper le script en ligne de commande par WGET et installer # manuellement les RPM pour le LiveCD) mais dans tous les cas, il n'est pas # supporte par son auteur... # # * SUSE / FEDORA / GENTOO / FREEBSD... : pas teste... # # # # # Lancement rapide pour UBUNTU , DEBIAN , KAELLA et KNOPPIX: # ========= ====== ==== ====== = ====== = ====== == ======== # # PREAMBULE: En mode LiveCD, votre memoire PC doit etre superieur a 512 Mo # si vous etes en ADSL2+ ou FTTH pour esperer voir le resultat car ce dernier # est un element crucial pour un tel test... # # METHODE POUR LES PROS D'UNIX ET DE LINUX: # ========================================= # # - Copier ce script (sur votre bureau par exemple) # # - Veuillez changer dans la partie "variable" la variable "archi" si # necessaire (I386 par defaut) # # - Veuillez changer dans la partie "variable" la variable "homme" si # necessaire (pour info les valeurs du livecd /home/casper, /home/knoppix # et /home/ubuntu/ sont autodetectes par le script) # # - Executez ce script sous un terminal unix via "bash" et attendez environ # 3 minutes le resultat... # # METHODE POUR LES DEBUTANTS: # =========================== # # a) Allez sur ma page WEB (http://80.247.230.136/vpst-dlf.htm) ou # placez-vous sur le lien que je vous ai donne par email ou sur un forum # si tel etait le cas... # # Pour DEBIAN et UBUNTU, les debutants possedant un PC a base de processeur # AMD ne devraient utiliser pour des raisons de simplicite que des versions # I386 et non des versions AMD64 !!! Les bidouilleurs et les possesseurs de # Mac ou d'autres OS logiciel devront par contre changer dans ce script la # valeur nomme "archi" situe dans la partie "variable" du script ! # # - Si vous executez ce script sur l'une des 4 distributions pre-cites depuis # un disque dur (en mode non-LiveCD donc), il vous faut changer dans ce # script la variable "homme" situe dans la partie "variable" du script ! # # ********************************************************** # NE JAMAIS MODIFIER CE FICHIER SOUS WINDOWS OU SOUS MAC !!! # ********************************************************** # # b) Copier [ou "glisser / deposer" comme sous Windows] le fichier sur le # bureau (nomme "Desktop" en anglais) # # c) Double-cliquez sur le fichier et choisissez "Ouvrir avec" # # d) (KNOPPIX et KAELLA) Choisissez "Systeme" / "Interpreteurs de commande" # puis "Bash", cochez les 3 croix puis cliquez sur "OK" # # (UBUNTU et DEBIAN KDE) Tapez "/bin/bash" (sans les guillemets bien sur) # dans la ligne de commande puis cliquez sur "OK" # # (DEBIAN GNOME) Faites un clic droit et selectionner "Open with Other # Application" puis choisissez "bash" # # (DEBIAN STANDARD) ne marche plus chez moi :-( # # (DEBIAN XFCE) sauver le script sur le bureau + lancer le terminal + # executer "bash nom_du_fichier.sh" # # ---ATTENTION--- MON SCRIPT N'A ETE TESTE QU'AVEC BASH, l'utilisation d' # interpreteurs de commandes synonymes style "sh" ou "zsh" n'est pas garantie. # # e) ATTENDEZ 3 MINUTES ET VOYEZ LE RESULTAT... # # # # B E T A V E R S I O N !!!!! # B E T A V E R S I O N !!!!! # B E T A V E R S I O N !!!!! # B E T A V E R S I O N !!!!! # B E T A V E R S I O N !!!!! # B E T A V E R S I O N !!!!! # B E T A V E R S I O N !!!!! # B E T A V E R S I O N !!!!! # # # # (Les 3 lignes suivantes sont interne a l'auteur): # (Internal 4 the author / method to force script test): # * Pomper l'iso de FREE et stopper quand il ne reste plus que 30 Mo de RAM # * Passer de 130 a 1300 # # # # COMMAND LINE SYNTAX: # "sh quick.sh" use default (french) server to download HTTRACK software # "sh quick.sh http://ftp.uk.debian.org" use debian UK mirror server # # # # # ##################################################################### variable() { archi=i386 homme=/home/willemijns ftp=http://ftp.fr.debian.org libhttrack=libhttrack1_3.40.4-3.1_$archi.deb httrack=httrack_3.40.4-3.1_$archi.deb timelast=130 } variable2() { echo ftp://ftp.repcenet.hu/testfile_100M > goodlist.txt echo ftp://ftp.ict.nl/100mb.exe >> goodlist.txt echo ftp://ftp.mediasat.ro/pub/100MB.test >> goodlist.txt echo ftp://ftp.nemjbc.cz/pub/test/100MB >> goodlist.txt echo ftp://ftp.net.tiscali.fr/100M.rnd >> goodlist.txt echo ftp://ftp.storm.ca/100mb-test >> goodlist.txt echo ftp://ftp.avonet.cz/test/100mb >> goodlist.txt echo ftp://ftp.infotech.at/Test/test_100mb.txt >> goodlist.txt echo ftp://ftp.corbina.ru/pub/100Mb >> goodlist.txt echo ftp://ftp.eutelia.it/test/100M >> goodlist.txt echo ftp://ftp.claranet.nl/100MB.bin >> goodlist.txt echo ftp://ftp.pub.ro/pub/100MB >> goodlist.txt echo ftp://ftp.quicknet.nl/pub/Speedtest/100mb.nul >> goodlist.txt echo ftp://ftp.telianet.dk/pub/test/100meg.bin >> goodlist.txt echo ftp://ftp.tiscali.nl/pub/test/100megabyte.bin >> goodlist.txt echo ftp://ftp.mts-nn.ru/pub/100m >> goodlist.txt echo ftp://ftp.punkt.pl/pub/100mb.zip >> goodlist.txt echo ftp://ftp.termsnet.cz/100mega >> goodlist.txt echo ftp://ftp.t-systems.at/pub/100mb >> goodlist.txt echo ftp://ftp.tweakdsl.nl/test/100mb.bin >> goodlist.txt echo ftp://ftp.easynet.nl/testfile100 >> goodlist.txt echo ftp://ftp.bit.nl/pub/speedtest/100mb.bin >> goodlist.txt echo ftp://ftp.noos.fr/pub/software/Test100Mo >> goodlist.txt echo ftp://ftp.uninet.ee/100MB >> goodlist.txt echo ftp://ftp.corenap.com/pub/100M >> goodlist.txt echo ftp://ftp.gldn.net/pub/test_speed/100mb_1 >> goodlist.txt echo ftp://speed10.multikabel.net/100mb.nul >> goodlist.txt echo ftp://ftp.videotron.net/vitesse/1000mbits >> goodlist.txt echo ftp://ftp.cistron.nl/pub/test/100mb.bin >> goodlist.txt echo ftp://ftp.solnet.ch/pub/speedtest/100MB_Testfile >> goodlist.txt echo ftp://ftp.tnib.de/pub/100MB >> goodlist.txt echo ftp://ftp.castel.nl/100mbtest >> goodlist.txt echo ftp://ftp.cgocable.ca/teste_100mb.zip >> goodlist.txt echo ftp://ftp.tudelft.nl/d2/Speedtest/100MB.bin >> goodlist.txt echo ftp://ftp.oru.se/pub/test/100m.fil >> goodlist.txt echo ftp://download.ip2.net/pub/ip2/100mb.bin >> goodlist.txt echo ftp://ftp.rus.uni-stuttgart.de/pub/download/selfstudyAbschlussPreisverleihung.rm >> goodlist.txt echo ftp://ftp.enternet.hu/pub/tesztfile >> goodlist.txt echo ftp://213.115.0.11/speedtest/100MB >> goodlist.txt echo ftp://ftp.web-ster.com/100mb.bin >> goodlist.txt echo ftp://ftp.netglobalis.net/speedtest/100Mfile.bin >> goodlist.txt echo ftp://ftp.cinergycom.net/100mb-file >> goodlist.txt echo ftp://ftp.hypersurf.com/pub/speedtest/testfile.compressed.100meg >> goodlist.txt echo ftp://ftp.iserv.net/pub/download-test/100MB-File >> goodlist.txt echo ftp://ftp.nexg.net/100M >> goodlist.txt echo ftp://ftp.nyroc.rr.com/pub/speedtest/421MB%%20Test%%20File.avi >> goodlist.txt echo ftp://ftp.ornis.com/100Mo >> goodlist.txt echo ftp://ftp.rad.net.id/pub/test/goodwarriors.mpg >> goodlist.txt echo ftp://ftp.ets.org/pub/test/etslog.log >> goodlist.txt echo ftp://ftp.interbaun.com/DSLTests/100mb.dat >> goodlist.txt echo ftp://ftp.netdoor.com/pub/test/100MB.dat >> goodlist.txt echo ftp://ftp.ntplx.com/test/100m >> goodlist.txt echo ftp://ftp.pullman.com/pub/tests/100meg.file >> goodlist.txt echo ftp://ftp.ukrhub.net/pub/chanel_test.bin >> goodlist.txt echo ftp://ftp.westend.com/pub/urandom_100MB >> goodlist.txt echo ftp://ftp.tz.ru/pub/big.txt >> goodlist.txt echo ftp://ftp.domonet.ru/test/testfile >> goodlist.txt echo ftp://ftp.mcs.de/pub/mcsftptest.file >> goodlist.txt echo ftp://ftp.port80.se/100M >> goodlist.txt echo ftp://ftp.start.no/pub/test-big.bin >> goodlist.txt echo ftp://ftp.svenskaspel.se/pub/100meg >> goodlist.txt echo ftp://ftp.euroweb.hu/testfile >> goodlist.txt echo ftp://ftp.idilis.ro/test100M >> goodlist.txt echo ftp://ftp.galileo.edu/zeroes >> goodlist.txt echo ftp://ftp.sky-vision.net/pub/test/test.zip >> goodlist.txt echo ftp://ftp.homechoice.co.uk/test100mb.dat >> goodlist.txt echo ftp://ftp.nexnet.net.au/pub/test/100MB >> goodlist.txt echo ftp://mirror.pacific.net.au/100mb >> goodlist.txt echo ftp://ftp.embratel.net.br/pub/tst/load.tst >> goodlist.txt echo ftp://ftp.impulse.net/pub/test/test-100MB.random >> goodlist.txt echo ftp://ftp.kernel.ee/pub/test200m echo ftp://ftp.mgts.by/test/100mb.txt echo ftp://ftp.monarch.net/pub/test.100MB echo ftp://ftp.nkosino.ru/100mb_1 echo ftp://ftp.pullman.com/pub/tests/100meg.file echo ftp://ftp.vci.net/speedtest/download.exe echo ftp://ftp.gavlenet.com/pub/500MB >> goodlist.txt echo ftp://ftp.sandnet.se/pub/Images/500MB.img >> goodlist.txt } # ##################################################################### part5() { variable2 clear echo echo echo echo ' Please wait, result will be displayed in about 2 minutes...' echo ' ------ ----- ------ ---- -- --------- -- ----- - ----------' echo echo echo echo echo 'DO NOT FORGET ! To be sure to know REAL result:' echo '- YOU MUST CLOSE ***** ALL ***** YOUR INTERNET SOFTWARE (as P2P, IM software,' echo 'download manager, browser... even resident as firewall and anti-virus),' echo '- IF YOU SHARE YOUR INTERNET ACCESS, CHECK IF YOU ARE ALONE,' echo '- LAUNCH THIS SOFTWARE FROM A REAL HARD DISK NOT USB / FIREWIRE DEVICES,' echo '- USE ETHERNET CONNEXIONS INSTEAD OF WIRELESS/WIFI,' echo '- IF YOU DO NOT USE LIVECD YOU MUST CHECK YOUR COMPUTER FROM UNIX MALWARES' echo 'AS ROOTKITS,' echo '- DO NOT USE YOUR DSL LINE (PHONE WITH VoIP, READ TV on DSL...).' echo echo 'FYI: HTTRACK software who is used can crash on some computers at the end of' echo 'the test. It is not a big problem here because the result will be good ;)' httrack --debug-ratestats --list goodlist.txt -%! --max-time=$timelast -qwH1c100T60Bds0f2%f0C0R30eO speedtest > nul sudo -u root rm $dir/vivilproject/speedtest/request rm $dir/vivilproject/speedtest/request echo ................................/\\...................................... >> speedtest/hts-stats.txt echo ................................II...................................... >> speedtest/hts-stats.txt echo ................................II...................................... >> speedtest/hts-stats.txt echo ................................II...................................... >> speedtest/hts-stats.txt echo >> speedtest/hts-stats.txt echo >> speedtest/hts-stats.txt echo [English] This number after "Rate=" is your speedtest in bytes / seconds. >> speedtest/hts-stats.txt echo FYI: >> speedtest/hts-stats.txt echo - the software sometimes wrote an error before reading this page, ignore it ! >> speedtest/hts-stats.txt echo - please only read second line because first line always give bad result... >> speedtest/hts-stats.txt echo >> speedtest/hts-stats.txt echo [Francais] Le nombre apres "Rate=" est votre vitesse en bytes / secondes. >> speedtest/hts-stats.txt echo Pour info: >> speedtest/hts-stats.txt echo - le logiciel peut afficher une erreur dans certains cas, ignorez-la ! >> speedtest/hts-stats.txt echo - la premiere ligne donne toujours un resultat en dessous de la realite... >> speedtest/hts-stats.txt echo >> speedtest/hts-stats.txt echo >> speedtest/hts-stats.txt echo Press a key to continue / Pressez une touche pour continuer >> speedtest/hts-stats.txt cp speedtest/hts-stats.txt $dir/vivilproject/speedtest/debug.txt grep "Write error" speedtest/hts-log.txt if [ $? -eq 0 ]; then sudo -u root rm speedtest/hts-stats.txt rm speedtest/hts-stats.txt cp $dir/vivilproject/speedtest/temp1 speedtest/hts-stats.txt fi } kor() { sudo -u root rm -d -r vivilproject rm -d -r vivilproject echo blahblah > $dir/Desktop/please_wait mkdir vivilproject cd vivilproject mkdir speedtest cd speedtest cat $dir/Desktop/$0 $dir/Desktop/$0 $dir/Desktop/$0 $dir/Desktop/$0 $dir/Desktop/$0 > request echo > temp1 echo [English] Write error ! >> temp1 echo - in LiveCD mode, it seems your computer memory is too small ! >> temp1 echo - in harddisk mode, maybe your hard disk \(quota\) is full ? >> temp1 echo >> temp1 echo Please press "ENTER" key to purge temporary files... >> temp1 echo >> temp1 echo >> temp1 echo >> temp1 echo >> temp1 echo [Francais] Erreur d\'ecriture ! >> temp1 echo - en mode LiveCD, cela est souvent du a une memoire insuffisante de votre >> temp1 echo ordinateur ! >> temp1 echo - en mode disque dur, cela est souvent du a un probleme de quota disque... >> temp1 echo >> temp1 echo Merci d\'appuyer sur la touche "ENTREE" pour purger les fichiers temporaires... >> temp1 echo You are not connected in the net... > temp2 echo One of speedtest package core file can not be downloaded, > temp3 echo maybe you are not connected on the net or remote FTP server is down ... >> temp3 sudo -u root rm debug.txt rm debug.txt sudo -u root rm dupe rm dupe sudo -u root rm $dir/Desktop/result.txt rm $dir/Desktop/result.txt mkdir speedtest } theend() { cp speedtest/hts-stats.txt $dir/Desktop/result.txt sudo -u root rm $dir/Desktop/please_wait rm $dir/Desktop/please_wait clear cat speedtest/hts-stats.txt read } # internal4author sync if [ -t 0 ]; then variable if [ -d "$homme" ]; then dir=$homme fi if [ -d "/home/casper" ]; then dir=/home/casper fi if [ -d "/home/knoppix" ]; then dir=/home/knoppix fi if [ -d "/home/ubuntu" ]; then dir=/home/ubuntu fi if [ -d "$dir/Desktop" ]; then echo else clear echo echo echo echo It seems you do not use KNOPPIX, UBUNTU or other \"DEBIAN Like\" \(LiveCd\) echo in GUI mode... echo echo echo echo Please understand i can not guarantee result in this kind of situation... echo echo echo echo echo echo echo Press "ENTER" to continue... read dir=/xxxx/xxxx fi sync cd $dir if [ -a "Desktop/please_wait" ]; then echo 'This speedtest yet run ' else gnome-system-monitor & if [ -n "$1" ]; then ftp=$1 fi kor # ########################################################################## # apt-get update # apt-get install libhttrack1 # apt-get install httrack # apt-get clean # part5 # theend # # if you really want to use "apt-get", you can delete next 30 lines # ########################################################################## sudo -u root rm $libhttrack rm $libhttrack wget $ftp/debian/pool/main/h/httrack/$libhttrack sudo -u root dpkg -i $libhttrack dpkg -i $libhttrack if [ -a "$libhttrack" ]; then sudo -u root rm $libhttrack rm $libhttrack else sudo -u root rm speedtest/hts-stats.txt rm speedtest/hts-stats.txt cp $dir/vivilproject/speedtest/temp3 dupe cp $dir/vivilproject/speedtest/temp3 speedtest/hts-stats.txt theend fi if [ -a "dupe" ]; then echo nodupe else sudo -u root rm $httrack rm $httrack wget $ftp/debian/pool/main/h/httrack/$httrack sudo -u root dpkg -i $httrack dpkg -i $httrack if [ -a "$httrack" ]; then sudo -u root rm $httrack rm $httrack sync part5 theend else sudo -u root rm speedtest/hts-stats.txt rm speedtest/hts-stats.txt cp $dir/vivilproject/speedtest/temp3 speedtest/hts-stats.txt theend fi fi # end of erasing for "apt-get" use fi else echo fi echo sudo -u root rm -d -r vivilproject cd .. cd .. rm -d -r vivilproject