You are not logged in.
Pages: 1
I've written a mirror list optimizer (mlopt)
Mirror list optimizer (mlopt)
Mlopt is designed to organize your mirrorlist. It fetches JSON data from archlinux.org and uses
that to sort your new mirror list. The *exact* line you have in your mirror list will be used for
writting the new list.
[options]
usage: mlopt [-h] [--w WRITE_DEST] [--a] [--r READ_FROM] [--i]
[--sort SORT_METHOD] [--reverse] [--l LIMIT] [--v]
Mirror list optimizer (mlopt)
optional arguments:
-h, --help show this help message and exit
--w WRITE_DEST write servers to file
--a append servers to file
--r READ_FROM read servers from path
--i show incomplete servers
--sort SORT_METHOD sort mirrorlist by score, last_sync, delay
--reverse reverse the sorted mirrorlist
--l LIMIT number of servers to show/write
--v show more output
Example usage:
# Read from another file, then write mirrorlist.
mlopt --r /etc/pacman.d/mirrorlist.pacnew --w /etc/pacman.d/mirrorlist --sort score
# Print servers by score
mlopt --sort score
# Print servers by delay
mlopt --sort delay --v
# Print servers by last_sync (latest are shown first)
mlopt --sort last_sync
https://github.com/Afterburn/mlopt
Report bugs in this thread, or raise a issue on github.com
Sample output:
mlopt --sort score
score: 0.88 http://mirrors.kernel.org/archlinux/
score: 1.46 ftp://mirrors.kernel.org/archlinux/
score: 13.55 http://mirrors.st.uz/archlinux/
score: 15.25 ftp://mirrors.st.uz/archlinux/
mlopt --sort last_sync
last_sync: 2012-02-29 19:00:01 http://mirrors.kernel.org/archlinux/
last_sync: 2012-02-28 21:20:02 ftp://mirrors.st.uz/archlinux/
Last edited by stealthy (2012-03-01 08:37:47)
clipodder-git A small simple cron-friendly podcast downloader, with support for arbitrary user defined media types (pdf, html, etc...)
Offline
Its working. How about making it as an AUR package?
[root@candice ~]# mlopt --sort last_sync
last_sync: 2012-03-02 02:00:02 http://mirrors.kernel.org/archlinux/
last_sync: 2012-03-02 01:50:01 http://schlunix.org/archlinux/
last_sync: 2012-03-02 00:20:01 http://mirrors.rutgers.edu/archlinux/
last_sync: 2012-03-01 21:20:01 http://mirrors.lax1.thegcloud.com/arch//
[root@candice ~]#
Offline
Just out of curiosity, are you aware of Reflector?
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Not until you posted the link.
Offline
Xyne, no I was not aware. Looks like you coded it in Python3, which I believe is faster right?. Do you want to team up and code one in C/C++?
clipodder-git A small simple cron-friendly podcast downloader, with support for arbitrary user defined media types (pdf, html, etc...)
Offline
Coding it in C/C++ might be interesting, but I think it's more useful as a Python3 module because it can be used in conjunction with pyalpm and python3-aur. C/C++ might be a bit faster, but it's network-bound, so the speedup would probably be negligible. Python also has the added convenience of a JSON module in the standard library.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Gotta agree.
clipodder-git A small simple cron-friendly podcast downloader, with support for arbitrary user defined media types (pdf, html, etc...)
Offline
Pages: 1