fastest_cvsup(7)

NAME
fastest_cvsup - find fastest CVSup server

SYNOPSIS
fastest_cvsup [-h] [-(q|Q)] [-r] -c (country codes|local|all)

DESCRIPTION
Displays the 3 fastest CVSup servers in user specified countries. It can just return the fastest for use in automated shell scripts.

It uses Time::HiRes for timings and IO::Socket::INET to make a socket connection to the target server, the server response is taken notice of. Unlike some shell scripts it does not rely on 'pings' to measure network speed.

USAGE
displays usage. quiet mode - only returns the fastest server and prints a progress meter. very quiet mode - in addition the progress meter is not shown. uses remote CVSup server list from the online FreeBSD Handbook.

If the variable `$REWRITE_SELF' is set to 1 in the script then (as if by magic) it re-writes itself with the new server list. This only works as root and does not do it by default. this is a list (comma separated, no spaces) of server groups to time.

FreeBSD servers are grouped into country codes - see the script or the FreeBSD Handbook for a full list.

NetBSD and OpenBSD servers are lumped together under the 'netbsd' and 'openbsd' codes respectively. uses the countries specifed in the `@LOCAL_CC' array. Edit the script to specify which countries are considered local. uses all the FreeBSD servers. This may take some time, but is quite interesting!

EXAMPLES
times the FreeBSD CVSup servers in the United Kingdom, France and Germany:

    $ fastest_cvsup -c uk,fr,de
times the OpenBSD and NetBSD CVSup servers:

    $ fastest_cvsup -c openbsd,netbsd
shell script, finds the fastest UK FreeBSD CVSup server, then runs cvsup using that server:

    #!/bin/sh
    if SERVER=`fastest_cvsup -q -c uk`; then
      cvsup -h $SERVER /usr/local/etc/cvsup/supfile
    fi

RETURN VALUES
Returns 0 without any errors, 1 with errors.

AUTHOR
A.J.Robinson, <ajr@subdimension.com>