You are not logged in.

#1 2009-12-22 21:26:25

Raffles10
Member
From: London, UK
Registered: 2009-05-09
Posts: 115

Use Arch Mirrorcheck !

Just a quick heads up for potential Arch ftp installers. Check Arch Mirrorcheck before installing via ftp.

You may think that by doing an ftp install you're getting all the latest that Arch has to offer, a quick look at Mirrorcheck will ensure that you do. After spending some time playing with another distro' I re-installed Arch + KDE two days ago choosing ftp://mirrors.uk2.net as the mirror for installation. Two days have gone by with no updates so I checked Mirrorcheck. It shows, unmissably emblazoned in red, that ftp://mirrors.uk2.net hasn't synced for 33 days ! So switching to another mirror I now have 650mb of updates to install, it looks like the entire KDE has updated in the last 33 days, just my luck.

Kinda wish I'd checked it before installing. hmm

Offline

#2 2009-12-22 21:45:27

some-guy94
Member
Registered: 2009-08-15
Posts: 360

Re: Use Arch Mirrorcheck !

archlinux.unixheads.org is also outdated, I went nearly 30 days without updating.

Offline

#3 2009-12-22 21:57:31

Meyithi
Member
From: Wirral, UK
Registered: 2009-06-21
Posts: 550
Website

Re: Use Arch Mirrorcheck !

Must admit same thing happened to me smile

Is nothing on the beginners guide to warn about it, but afterwards it dawns on you at some stage that the reason you aren't getting updates is because the mirror is dormant.

Was no harm done though and it was months ago.


The mind roams more freely in empty rooms.
dwm - colours - ncmpcpp - system
irc://irc.freenode.net:meyithi

Offline

#4 2009-12-22 22:02:44

ctarwater
Member
Registered: 2009-02-05
Posts: 300

Re: Use Arch Mirrorcheck !

I've been in the process of organizing all of my install/post-install notes and just today organized my mirrorlist crapola to make sure you have the fastest most up to date mirrors (for your area).

1) install reflector (AUR)
2) run reflector 'reflector -l 10 -r -o /etc/pacman.d/mirrorlist' will scan mirrorcheck for the most up to date mirrors and write the 10 most recent to your mirrorlist file.
3) backup your mirrorlist file 'cp mirrorlist mirrorlist.backup'
4) run rankmirrors to choose your fastest connection from the list reflector just provided 'rankmirrors -n 6 mirrorlist.backup > mirrorlist'

Most of this is in the wiki but not in such plain language.

Offline

#5 2009-12-22 22:03:03

majiq
Member
Registered: 2009-03-06
Posts: 259

Re: Use Arch Mirrorcheck !

I wrote a little script to check the uncommented mirrors from pacman.d for me from the command line. Maybe someone will find it useful. It's written using python3, which I'm hardly competent with, so suggestions are appreciated. It's probably also a little convoluted; I couldn't find a DOM XML parser for python. It's good for when you see that you have no updates, you can just run mirrorcheck.py and it'll tell you whether you're being an Arch update-addict or using bad mirrors.

#!/usr/bin/python3

import subprocess
import http.client
from html.parser import HTMLParser

servers_to_check = []

#-------------------------------------------------------------------------------
#Define the parser
class server_checker (HTMLParser):
    check_servers = []
    current_repo = ''
    inA = 0
    inCaption = 0
    foundServer = 0
    printMode = 0
    blockMode = 0

    def handle_starttag (self, tag, attrs):
        if tag == 'caption':
            self.inCaption = 1
        if tag == 'a':
            self.inA = 1
    
    def handle_endtag (self, tag):
        if tag == 'caption':
            self.inCaption = 0
        if tag == 'a':
            self.inA = 0
        if tag == 'td':
            if self.blockMode > 0:
                self.blockMode -= 1

    def handle_data (self, text):
        if self.inA == 1:
            self.printMode = -1
            for i in range(0,len(self.check_servers)):
                if text.find(self.check_servers[i].split(' ')[0]) != -1:
                    self.printMode = 1
                    print("Server: ", self.check_servers[i])
                    self.current_repo = self.check_servers[i].split(' ')[1]
                    break
            if self.printMode == -1:
                self.printMode = 0
        elif self.printMode == 1:
            if text.find(self.current_repo) > 0 and self.blockMode == 0:
                self.blockMode = 4
            if len(text.strip('\n ')) > 0 and self.blockMode > 0:
                if self.blockMode == 4:
                    print('\t' , text.strip('\n '), end = '\t')
                elif self.blockMode == 2:
                    print(text.strip('\n '))
                else:
                    print(text.strip('\n '), end='\t')

#-------------------------------------------------------------------------------
#Set up the parser

myServerChecker = server_checker()

i = 1
for line in subprocess.getoutput("grep -- '^[^#]' /etc/pacman.d/mirrorlist | sed -e 's|^.*://||;s|/.*/| |'").split('\n'):
    myServerChecker.check_servers.append(line)
    print ("Server",i,": ",line.split(' ')[0])
    i+=1

connection = http.client.HTTPSConnection('users.archlinux.de')
connection.request('GET','/~gerbra/mirrorcheck.html')
response = connection.getresponse()

print ("Connection response is" , response.status)

if response.status != 200:
    print ("Connection error")
    exit

#-------------------------------------------------------------------------------
#Run the parser
myServerChecker.feed(response.read().decode().strip('\n'))
myServerChecker.close()

Edit: Well...aren't I shamefaced for having reinvented the wheel. Oh well, it was a fun distraction. :-)

Last edited by majiq (2009-12-22 22:04:03)

Offline

#6 2009-12-22 22:28:08

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: Use Arch Mirrorcheck !

ctarwater wrote:

I've been in the process of organizing all of my install/post-install notes and just today organized my mirrorlist crapola to make sure you have the fastest most up to date mirrors (for your area).

1) install reflector (AUR)
2) run reflector 'reflector -l 10 -r -o /etc/pacman.d/mirrorlist' will scan mirrorcheck for the most up to date mirrors and write the 10 most recent to your mirrorlist file.
3) backup your mirrorlist file 'cp mirrorlist mirrorlist.backup'
4) run rankmirrors to choose your fastest connection from the list reflector just provided 'rankmirrors -n 6 mirrorlist.backup > mirrorlist'

Most of this is in the wiki but not in such plain language.

"reflector -r" already runs the list through rankmirrors, so there's no point in running rankmirrors again on the list in step 4.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#7 2009-12-22 22:35:04

ctarwater
Member
Registered: 2009-02-05
Posts: 300

Re: Use Arch Mirrorcheck !

really?  sweet, I didn't know that.  Thanks Xyne.

Offline

#8 2009-12-22 23:27:25

Raffles10
Member
From: London, UK
Registered: 2009-05-09
Posts: 115

Re: Use Arch Mirrorcheck !

Updates complete, no errors.  I'll try reflector, sounds very useful. smile

Offline

#9 2009-12-23 02:35:33

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: Use Arch Mirrorcheck !

I find the mirror status chart here better formatted than gerbra's:

https://www.archlinux.de/?page=MirrorSt … ync;sort=1

...and there're missing mirrors at gerbra's page too(e.g. ftp://mirrors.kernel.org/archlinux/)


This silver ladybug at line 28...

Offline

#10 2010-01-07 00:26:24

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: Use Arch Mirrorcheck !

lolilolicon wrote:

I find the mirror status chart here better formatted than gerbra's:

https://www.archlinux.de/?page=MirrorSt … ync;sort=1

...and there're missing mirrors at gerbra's page too(e.g. ftp://mirrors.kernel.org/archlinux/)

Ah, this is where I saw that. I've switched Reflector over to a customize MirrorStatus page on archlinux.de (thanks Pierre).
It's available on my site for now... I'll push it to community once I feel the latest perl-xyne-* packages have stabilized again.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#11 2010-01-07 12:26:31

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: Use Arch Mirrorcheck !

That's great Xyne.


This silver ladybug at line 28...

Offline

Board footer

Powered by FluxBB