LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-28-2015, 12:55 PM   #16
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1.2 on Lenovo Thinkpad W520
Posts: 9,816

Rep: Reputation: Disabled

Quote:
Originally Posted by travis82 View Post
I didn't touch /etc/resolve.conf though.

Code:
# Generated by NetworkManager
domain domain.name
search domain.name
nameserver 217.218.155.155
nameserver 217.218.127.127
Should I change it?
You do not have to. But you could change just to try, redo the tests, compare the results with the previous ones then decide which ones to use depending on their respective outcome.

Last edited by Didier Spaier; 12-28-2015 at 12:57 PM.
 
1 members found this post helpful.
Old 01-04-2016, 09:51 PM   #17
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,011

Rep: Reputation: 5561Reputation: 5561Reputation: 5561Reputation: 5561Reputation: 5561Reputation: 5561Reputation: 5561Reputation: 5561Reputation: 5561Reputation: 5561Reputation: 5561
I know I am a bit late, but I was on vacation and I figured I should spend time with my family rather than the computer. Sorry

Anyway, I was looking for something like this back in November and came up short, but I ended up finding a script on an Ubuntu forum by Lance Rushing to check download times for Ubuntu mirrors. His originally tried to time the download, but it didn't seem to provide accurate results, so I ended up modifying it to grab the speed of the download, format it with numfmt (for those of you who remember, this is where I found how to use numfmt, which Pat then incorporated into the installer to determine partition sizes), and then sort the results by speed. If the speeds come in at under 10KiBps, I consider the mirror as a failure as it is likely downloading an index.html file and the mirror is currently not active (not perfect, but pretty accurate in my testing). I had originally intended on doing some more cleanup of the code before I posted, but I can do that later. I did some cleaning tonight and added colors for the failure and speed to make them more distinguishable while testing. The results are cleanly formatted and sorted by speed. .

The default list of servers in the script are just the US-based servers I grabbed out of /etc/slackpkg/mirrors. You can change them as needed for your location. But I figured it was better to try and limit how many mirrors it will attempt to ensure you're not sitting for 30 minutes as it checks all the servers, but if you want all of them, feel free

PHP Code:
#!/bin/bash

# mirror_test.sh
# Originally written for Ubuntu by Lance Rushing <lance_rushing@hotmail.com>
# Dated 9/1/2006
# Taken from http://ubuntuforums.org/showthread.php?t=251398
# This script is covered under the GNU Public License: http://www.gnu.org/licenses/gpl.txt

# Modified for Slackware by Jeremy Brent Hansen <jebrhansen -at- gmail.com>
# Modified 2015/11/06


# Add or change mirrors from /etc/slackpkg/mirrors as desired (these are the US mirrors)
MIRRORS="ftp://carroll.aset.psu.edu/pub/linux/distributions/slackware/slackware64-current/
http://carroll.aset.psu.edu/pub/linux/distributions/slackware/slackware64-current/
ftp://ftp.gtlib.gatech.edu/nv/ao2/lxmirror/ftp.slackware.com/slackware64-current/
ftp://ftp.osuosl.org/.2/slackware/slackware64-current/
http://ftp.osuosl.org/.2/slackware/slackware64-current/
ftp://hpc-mirror.usc.edu/pub/linux/distributions/slackware/slackware64-current/
http://hpc-mirror.usc.edu/pub/linux/distributions/slackware/slackware64-current/
ftp://marmot.tn.utexas.edu/pub/slackware/slackware64-current/
http://marmot.tn.utexas.edu/slackware/slackware64-current/
ftp://mirror.cs.princeton.edu/pub/mirrors/slackware/slackware64-current/
http://mirror.metrocast.net/slackware/slackware64-current/
ftp://mirrors.easynews.com/linux/slackware/slackware64-current/
http://mirrors.easynews.com/linux/slackware/slackware64-current/
http://mirrors.kingrst.com/slackware/slackware64-current/   
ftp://mirrors.us.kernel.org/slackware/slackware64-current/
http://mirrors.us.kernel.org/slackware/slackware64-current/
ftp://mirrors.xmission.com/slackware/slackware64-current/
http://mirrors.xmission.com/slackware/slackware64-current/
http://slackbuilds.org/mirror/slackware/slackware64-current/ 
http://slackware.cs.utah.edu/pub/slackware/slackware64-current/
http://slackware.mirrorcatalogs.com/slackware64-current/
http://slackware.mirrors.pair.com/slackware64-current/
ftp://slackware.mirrors.tds.net/pub/slackware/slackware64-current/
http://slackware.mirrors.tds.net/pub/slackware/slackware64-current/
ftp://slackware.virginmedia.com/mirrors/ftp.slackware.com/slackware64-current/
http://slackware.virginmedia.com/slackware64-current/
ftp://spout.ussg.indiana.edu/linux/slackware/slackware64-current/
http://spout.ussg.indiana.edu/linux/slackware/slackware64-current/
ftp://teewurst.cc.columbia.edu/pub/linux/slackware/slackware64-current/
http://teewurst.cc.columbia.edu/pub/linux/slackware/slackware64-current/"

# Use any adequetly sized file to test the speed. This is ~7MB.
# The location should be based on the relative location within
# the slackware64-current tree. I originally tried a smaller 
# file (FILELIST.TXT ~1MB), but I was seeing slower speed results
# since it didn't have time to fully max my connection. Depending
# on your internet speed, you may want to try different sized files.
FILE="kernels/huge.s/bzImage"

# Number of seconds before the test is considered a failure
TIMEOUT="5"

# String to store results in
RESULTS=""

# Set color variables to make results and echo statements cleaner
RED="\e[31m"
GREEN="\e[32m"
NC="\e[0m"  #No color

for MIRROR in $MIRRORS ; do
    
    echo -
"Testing ${MIRROR} "
    
    
URL="${MIRROR}${FILE}"

    
SPEED=$(curl --max-time $TIMEOUT --silent --output /dev/null --write-out %{speed_download$URL)

    if (( $(echo 
"$SPEED < 10000.000" bc -l) )) ; then
        
echo -"${RED}Fail${NC}";
    else 
        
SPEED="$(numfmt --to=iec-i --suffix=B --padding=7 $SPEED)ps"
        
echo -"${GREEN}$SPEED${NC}"
        
RESULTS="${RESULTS}\t${SPEED}\t${MIRROR}\n";
    
fi

done
;

echo -
"\nResults:"
echo -e $RESULTS sort -hr 
The results would look like:

Code:
jbhansen@dead-therapist:~$ sh mirror_test.sh 
Testing ftp://carroll.aset.psu.edu/pub/linux/distributions/slackware/slackware64-current/ Fail
Testing http://carroll.aset.psu.edu/pub/linux/distributions/slackware/slackware64-current/ Fail
Testing ftp://ftp.gtlib.gatech.edu/nv/ao2/lxmirror/ftp.slackware.com/slackware64-current/ Fail
Testing ftp://ftp.osuosl.org/.2/slackware/slackware64-current/  1.9MiBps
Testing http://ftp.osuosl.org/.2/slackware/slackware64-current/  3.8MiBps
Testing ftp://hpc-mirror.usc.edu/pub/linux/distributions/slackware/slackware64-current/ Fail
Testing http://hpc-mirror.usc.edu/pub/linux/distributions/slackware/slackware64-current/ Fail
Testing ftp://marmot.tn.utexas.edu/pub/slackware/slackware64-current/  3.2MiBps
Testing http://marmot.tn.utexas.edu/slackware/slackware64-current/  4.8MiBps
Testing ftp://mirror.cs.princeton.edu/pub/mirrors/slackware/slackware64-current/  1.4MiBps
Testing http://mirror.metrocast.net/slackware/slackware64-current/  299KiBps
Testing ftp://mirrors.easynews.com/linux/slackware/slackware64-current/  2.2MiBps
Testing http://mirrors.easynews.com/linux/slackware/slackware64-current/  3.6MiBps
Testing http://mirrors.kingrst.com/slackware/slackware64-current/  6.2MiBps
Testing ftp://mirrors.us.kernel.org/slackware/slackware64-current/  2.3MiBps
Testing http://mirrors.us.kernel.org/slackware/slackware64-current/  2.4MiBps
Testing ftp://mirrors.xmission.com/slackware/slackware64-current/  2.0MiBps
Testing http://mirrors.xmission.com/slackware/slackware64-current/  4.5MiBps
Testing http://slackbuilds.org/mirror/slackware/slackware64-current/  5.0MiBps
Testing http://slackware.cs.utah.edu/pub/slackware/slackware64-current/  2.0MiBps
Testing http://slackware.mirrorcatalogs.com/slackware64-current/ Fail
Testing http://slackware.mirrors.pair.com/slackware64-current/  5.9MiBps
Testing ftp://slackware.mirrors.tds.net/pub/slackware/slackware64-current/  4.5MiBps
Testing http://slackware.mirrors.tds.net/pub/slackware/slackware64-current/  6.9MiBps
Testing ftp://slackware.virginmedia.com/mirrors/ftp.slackware.com/slackware64-current/ Fail
Testing http://slackware.virginmedia.com/slackware64-current/ Fail
Testing ftp://spout.ussg.indiana.edu/linux/slackware/slackware64-current/  3.2MiBps
Testing http://spout.ussg.indiana.edu/linux/slackware/slackware64-current/  999KiBps
Testing ftp://teewurst.cc.columbia.edu/pub/linux/slackware/slackware64-current/  197KiBps
Testing http://teewurst.cc.columbia.edu/pub/linux/slackware/slackware64-current/  235KiBps

Results:
         6.9MiBps       http://slackware.mirrors.tds.net/pub/slackware/slackware64-current/
         6.2MiBps       http://mirrors.kingrst.com/slackware/slackware64-current/
         5.9MiBps       http://slackware.mirrors.pair.com/slackware64-current/
         5.0MiBps       http://slackbuilds.org/mirror/slackware/slackware64-current/
         4.8MiBps       http://marmot.tn.utexas.edu/slackware/slackware64-current/
         4.5MiBps       http://mirrors.xmission.com/slackware/slackware64-current/
         4.5MiBps       ftp://slackware.mirrors.tds.net/pub/slackware/slackware64-current/
         3.8MiBps       http://ftp.osuosl.org/.2/slackware/slackware64-current/
         3.6MiBps       http://mirrors.easynews.com/linux/slackware/slackware64-current/
         3.2MiBps       ftp://spout.ussg.indiana.edu/linux/slackware/slackware64-current/
         3.2MiBps       ftp://marmot.tn.utexas.edu/pub/slackware/slackware64-current/
         2.4MiBps       http://mirrors.us.kernel.org/slackware/slackware64-current/
         2.3MiBps       ftp://mirrors.us.kernel.org/slackware/slackware64-current/
         2.2MiBps       ftp://mirrors.easynews.com/linux/slackware/slackware64-current/
         2.0MiBps       http://slackware.cs.utah.edu/pub/slackware/slackware64-current/
         2.0MiBps       ftp://mirrors.xmission.com/slackware/slackware64-current/
         1.9MiBps       ftp://ftp.osuosl.org/.2/slackware/slackware64-current/
         1.4MiBps       ftp://mirror.cs.princeton.edu/pub/mirrors/slackware/slackware64-current/
         999KiBps       http://spout.ussg.indiana.edu/linux/slackware/slackware64-current/
         299KiBps       http://mirror.metrocast.net/slackware/slackware64-current/
         235KiBps       http://teewurst.cc.columbia.edu/pub/linux/slackware/slackware64-current/
         197KiBps       ftp://teewurst.cc.columbia.edu/pub/linux/slackware/slackware64-current/
 
9 members found this post helpful.
Old 01-05-2016, 03:10 AM   #18
travis82
Member
 
Registered: Feb 2014
Distribution: Slackware
Posts: 432

Original Poster
Rep: Reputation: 221Reputation: 221Reputation: 221
Thank you very much bassmadrigal. I will try your script. I don't know whether this is my connection or mirrors fault as the outputs of Didier's and orbea's scripts are fluctuating day to day. One day a mirror seems best for my connection and other day it is the worst. Hence, I have to find the best mirror every time I want to update my system.
 
Old 01-05-2016, 04:30 AM   #19
Slax-Dude
Member
 
Registered: Mar 2006
Location: Valadares, Portugal
Distribution: Slackware
Posts: 464

Rep: Reputation: 215Reputation: 215Reputation: 215
Just to clarify:
Didier's script measures how fast the mirror responds to a request, while orbea's and bassmadrigal's script measure the speed of the data transfer between you and the mirror (which is what you actually are looking for).

It would be nice if our mirrorbrain setup could somehow give higher priority to those mirrors with higher file transfer speed, regardless of their location in relation to the user.
I often chose mirrors outside my country as those in Portugal tend to be slow.
 
1 members found this post helpful.
Old 09-03-2019, 12:10 PM   #20
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,011

Rep: Reputation: 5561Reputation: 5561Reputation: 5561Reputation: 5561Reputation: 5561Reputation: 5561Reputation: 5561Reputation: 5561Reputation: 5561Reputation: 5561Reputation: 5561
Sorry to revive this thread, but I'm still seeing people clicking that my post containing the script was useful. I'm glad people are still finding it beneficial

But since I no longer have the ability to edit that post, I wanted to post a link to my github that contains the actual script that can be edited and updated. In reality, I've only made one minor change in functionality since this script was posted on this thread and that was to make it easier to copy/paste a list of mirrors. But in case any changes are needed in the future, the latest version of the script can be found below.

slack-mirror-speedtest.sh
 
4 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
My own Slackpkg mirror? enine Slackware 10 09-08-2014 12:35 PM
[SOLVED] slackpkg mirror from current to 14.1 krakanut Slackware 3 05-28-2014 08:51 PM
when new slackware, what does slackpkg current mirror become? glorsplitz Slackware 2 01-14-2012 10:51 AM
how do I uncomment a mirror in slackpkg? guruwammabe Slackware 8 03-22-2007 02:55 PM
Slackpkg mirror's acidblue Slackware 6 01-06-2006 10:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration