LinuxCommandLibrary

rankmirrors

Rank a list of Pacman mirrors by connection and opening speed.

TLDR

Rank a mirror list

$ rankmirrors [/etc/pacman.d/mirrorlist]
copy


Output only a given number of the top ranking servers
$ rankmirrors -n [number] [/etc/pacman.d/mirrorlist]
copy


Be verbose when generating the mirrorlist
$ rankmirrors -v [/etc/pacman.d/mirrorlist]
copy


Test only a specific URL
$ rankmirrors --url [url]
copy


Output only the response times instead of a full mirrorlist
$ rankmirrors --times [/etc/pacman.d/mirrorlist]
copy

Help

usage:  
Version 4.23.2 
USAGE:
 pacman-mirrors [-h] [-f [NUMBER]] [-i [-d]] [-m METHOD] [--status] 
[-c COUNTRY [COUNTRY...] | [--geoip] | [--continent]] 
[-l] [-lc] [-q] [-t SECONDS] [-v] [-n] 
[--api] [-S/-B BRANCH] [-p PREFIX] 
[-P PROTO [PROTO...]] [-R] [-U URL] 

METHODS:
  -i, --interactive     Generate custom mirrorlist 
  -f, --fasttrack [NUMBER] 
                        Generate mirrorlist with a number of up-to-date 
                        mirrors. Overrides : --geoip, --method 
  -c, --country COUNTRY [COUNTRY ...] 
                        Comma separated list of countries, from which mirrors 
                        will be used 
  --geoip               Get current country using geolocation 
  --continent           Use continent from geolocation 

API:
  -a, --api             [-p PREFIX][-R][-S/-B|-G BRANCH][-P PROTO [PROTO ...]] 
  -S, -B, --set-branch {stable,testing,unstable} 
                        API: Replace branch in configuration 
  -p, --prefix PREFIX   API: Set prefix to : $mnt | /mnt/install 
  -P, --proto, --protocols {all,http,https,ftp,ftps} [{all,http,https,ftp,ftps} ...] 
                        API: Replace protocols in configuration 
  -R, --re-branch       API: Replace branch in mirrorlist 
  -U, --url URL         API: Replace mirror url in mirrorlist 

MISC:
  -G, --get-branch      Return branch from configuration 
  -d, --default         INTERACTIVE: Load default mirror file 
  -h, --help 
  -l, --list, --country-list 
                        List all available countries 
  -lc, --country-config 
                        lists configured mirror countries 
  -m, --method {rank,random} 
                        Generation method 
  -n, --no-mirrorlist   Use to skip generation of mirrorlist 
  -q, --quiet           Quiet mode - less verbose output 
  -s, --no-status       Ignore mirror branch status 
  -t, --timeout SECONDS 
                        Maximum waiting time for server response 
  -v, --version         Print the pacman-mirrors version 
  --no-color 
  --interval INTERVAL   Max. number of hours since last sync 
  -g                    Create mirror list from active pool. 
  --status              Status for the current mirror list. 
  -fc 

Copied to clipboard