cmd:apt-spy 

Tips 

http://wiki.linuxquestions.org/wiki/Apt-spy

  • To retrieve the latest list of Debian mirrors, run (as root)

    # apt-spy update
  • To find the fastest mirror in North America for testing, run

    # apt-spy -d testing -a north-america

Usage 

% apt-spy -d stable -a North-America -w /tmp/apt-spy.site.lst -n 10
Writing new sources.list file: /etc/apt/sources.list
writing topfile: /tmp/apt-spy.site.lst
% apt-spy -d etch -i /tmp/apt-spy.site.lst
SERVER: gulus.usherbrooke.ca
Benchmarking FTP...
                Error: The requested URL returned error: 404
Benchmarking HTTP...
                Downloaded 4073916 bytes in 12.85 seconds
                Download speed: 309.65 kB/sec
SERVER: cudlug.cudenver.edu
Benchmarking FTP...
                Error: The requested URL returned error: 404
Benchmarking HTTP...
                Downloaded 4067495 bytes in 12.99 seconds
                Download speed: 305.85 kB/sec
[...]
% cat /etc/apt/sources.list
# sources.list generated by apt-spy v3.1
deb http://gulus.usherbrooke.ca/debian/ stable main
deb-src http://gulus.usherbrooke.ca/debian/ stable main
deb http://security.debian.org/ stable/updates main
% cat /tmp/apt-spy.site.lst
gulus.usherbrooke.ca:/debian/:/debian/:
cudlug.cudenver.edu:/debian/:/debian/:
debian.uchicago.edu:/debian/:/debian/:
mirror.cs.wisc.edu:/pub/mirrors/linux/debian/:/pub/mirrors/linux/debian/:
ftp3.nrc.ca:/debian/:/debian/:
mirror.peer1.net::/debian/:
distro.ibiblio.org:/pub/linux/distributions/debian/:/pub/linux/distributions/debian/:
mirrors.geeks.org:/debian/:/debian/:
debian.fifi.org:/pub/debian/:/debian/:
debian.secsup.org:/pub/linux/debian/:/:

Help 

OPTIONS

-d distribution Debian distribution to use. Sensible values would be `stable', `testing' or `unstable'. This value is directly used in the generated sources.list, and is required unless updating.

-a area This will cause only servers in the specified area to be benchmarked. By default, valid values for area are `Africa', `Asia', `Europe', `North-America', `Oceania' and `South-America'.

-w file write a number of top servers to file in a format suitable for use with the -i option. The number of servers to output can be specified with the -n option, and defaults to 5.

-n number the number of top servers to write with the -w option.

-i file use file as input for apt-spy. You should generate this input file using the -w option.