How to find the fastest CVSUP mirror server
Some time ago I wrote about using fastest_cvsup, to find the fastest cvsup mirror server for use with csup on FreeBSD.
fastest_cvsup is a system utility written in Perl that finds fastest CVSup mirror server for FreeBSD, OpenBSD or NetBSD.
Here I’m going to tell you how to get started…
Install
First of all you need to install it, there are a number of ways to do this, but on FreeBSD you probably want to install from ports:
cd /usr/ports/sysutils/fastest_cvsup/ && make install clean
Note: You MUST be root to install ports
Get help
Once installed you are able to read more information about fastest_cvsup by issuing the following commands:
fastest_cvsup -h
This will display the general help.
man fastest_cvsup
This will display the more detailed manual page.
Usage examples
Here’s a few practical examples to get you started.
This example will check to see which United Kingdom (uk) based servers are quickest:
`# fastest_cvsup -c uk
Querying servers in countries: uk
–> Connecting to cvsup.uk.freebsd.org [131.111.8.41]…
- server replied: OK 17 0 SNAP_16_1h CVSup server ready
- time taken: 136.71 ms
–> Connecting to cvsup2.uk.freebsd.org [131.111.8.41]…- server replied: OK 17 0 SNAP_16_1h CVSup server ready
- time taken: 139.81 ms
–> Connecting to cvsup3.uk.freebsd.org [131.111.8.41]…- server replied: OK 17 0 SNAP_16_1h CVSup server ready
- time taken: 134.28 ms
–> Connecting to cvsup4.uk.freebsd.org [195.40.6.45]…- server replied: OK 17 0 SNAP_16_1h CVSup server ready
- time taken: 129.03 ms`
``
`» Speed Daemons:
- 1st: cvsup4.uk.freebsd.org 129.03 ms
- 2st: cvsup3.uk.freebsd.org 134.28 ms
- 3st: cvsup.uk.freebsd.org 136.71 ms`
To find the fastest server in Europe you would use something like this:
# fastest_cvsup -q -c uk,ie,fr,de,fi,no,nl,ch
Go nuts, test them all:
# fastest_cvsup -Q -r -c all
This example will give you the times of just OpenBSD and NetBSD servers:
# fastest_cvsup -c openbsd,netbsd
In this example we will use fastest_cvsup with the cvup command to update the ports using the fastest server in the United States (us):
# csup -g -L 2 -h `fastest_cvsup -Q -c us` /root/ports-supfile
Note: “-Q” is used to make it super quiet which is useful when using in scripts or in-line commands.
Find out more
Visit the fastest_cvsup website to find out more.
Comments