build set_fastest => all servers are dead

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
15,219
Location
GMT +7.00
Hello,

I've just noticed new feature in custombuild:

./build set_fastest

Code:
# ./build set_fastest
File already exists:    servers.txt
MD5 Checksum on servers.txt passed.
Testing with file 10.kb:
files.directadmin.com is dead
files2.directadmin.com is dead
files5.directadmin.com is dead
files6.directadmin.com is dead
Total test duration: 4 seconds

Testing with file 100.kb:
files.directadmin.com is dead
files2.directadmin.com is dead
files5.directadmin.com is dead
files6.directadmin.com is dead
Total test duration: 5 seconds

Fastest server is  at 0 B/s
Unable to determine fastest server


Please consider to change into LANG=C in order to change national locales for testing.
 
Last edited:
Not fixed yet:

Code:
[root@vps custombuild]# ./build set_fastest
File already exists:    servers.txt
MD5 Checksum on servers.txt passed.
Testing with file 10.kb:
files.directadmin.com is dead
files2.directadmin.com is dead
files5.directadmin.com is dead
files6.directadmin.com is dead
Total test duration: 5 seconds

Testing with file 100.kb:
files.directadmin.com is dead
files2.directadmin.com is dead
files5.directadmin.com is dead
files6.directadmin.com is dead
Total test duration: 7 seconds

Fastest server is  at 0 B/s
Unable to determine fastest server
[root@vps custombuild]# 
[root@vps custombuild]# 
[root@vps custombuild]#  env | grep LANG
LANG=ru_RU.UTF-8
[root@vps custombuild]# 
[root@vps custombuild]# 
[root@vps custombuild]# LANG=C ./build set_fastest
File already exists:    servers.txt
MD5 Checksum on servers.txt passed.
Testing with file 10.kb:
./build: line 8235: bc: command not found
 B/s    - files.directadmin.com
./build: line 8250: [: : integer expression expected
./build: line 8235: bc: command not found
 B/s    - files2.directadmin.com
./build: line 8250: [: : integer expression expected
./build: line 8235: bc: command not found
 B/s    - files5.directadmin.com
./build: line 8250: [: : integer expression expected
./build: line 8235: bc: command not found
 B/s    - files6.directadmin.com
./build: line 8250: [: : integer expression expected
Total test duration: 4 seconds

Testing with file 100.kb:
files.directadmin.com is dead
./build: line 8235: bc: command not found
 B/s    - files2.directadmin.com
./build: line 8250: [: : integer expression expected
./build: line 8235: bc: command not found
 B/s    - files5.directadmin.com
./build: line 8250: [: : integer expression expected
./build: line 8235: bc: command not found
 B/s    - files6.directadmin.com
./build: line 8250: [: : integer expression expected
Total test duration: 9 seconds

Fastest server is  at 0 B/s
Unable to determine fastest server
 
I dunno why someone would ever code it to require the bc command.

Tons of if statements are also missing quotes.
 
Hello,

I've updated the code to use perl, as it's got a much higher likelyhood of existing over bc.

John
 
Hello John,

OK, can't wait to test it. It's not published yet?

Regards,
Alex.
 
It's on files.directadmin.com. If you used the "old" verison, you might have a faster "filesX.directadmin.com" setting, which would be a different box, and takes about a day to get the new rsync.

If you want it now, set:
Code:
downloadserver=files.directadmin.com
in your options.conf, and do a ./build update.

Keep in mind that if you run the command, and it uses a different server, then if you do another ./build update, you'll be getting the old build again. This "window" should only last about 1/2 a day, at which point, the files mirrors will also get the updated build, then it won't matter.

John
 
Hi John,

ive edited the option file as described:

Code:
>cat options.conf | grep downloadserver
downloadserver=files.directadmin.com

But after build update the result seems to be the same (removed server.txt file aswell)

Code:
>./build set_fastest
Downloading             servers.txt...
--2011-02-14 11:16:25--  http://files.directadmin.com/services/custombuild/servers.txt
Risoluzione di files.directadmin.com... 72.35.85.222
Connessione a files.directadmin.com|72.35.85.222|:80... connesso.
HTTP richiesta inviata, in attesa di risposta... 200 OK
Lunghezza: 114 [text/plain]
Salvataggio in: "/usr/local/directadmin/custombuild/servers.txt"

100%[==================================================================================================>] 114         --.-K/s   in 0s

2011-02-14 11:16:25 (15,5 MB/s) - "/usr/local/directadmin/custombuild/servers.txt" salvato [114/114]

MD5 Checksum on servers.txt passed.
Testing with file 10.kb:
files.directadmin.com is dead
files2.directadmin.com is dead
files5.directadmin.com is dead
files6.directadmin.com is dead
files7.directadmin.com is dead
Total test duration: 2 seconds

Testing with file 100.kb:
files.directadmin.com is dead
files2.directadmin.com is dead
files5.directadmin.com is dead
files6.directadmin.com is dead
files7.directadmin.com is dead
Total test duration: 4 seconds

Fastest server is  at 0 B/s
Unable to determine fastest server

Any idea?

Thanks
 
Jello John,

LANG=C was not added into build script:

Code:
[root@vps1 custombuild]# ./build set_fastest
File already exists:    servers.txt
MD5 Checksum on servers.txt passed.
Testing with file 10.kb:
files.directadmin.com is dead
files2.directadmin.com is dead
files5.directadmin.com is dead
files6.directadmin.com is dead
files7.directadmin.com is dead
Total test duration: 5 seconds

Testing with file 100.kb:
files.directadmin.com is dead
files2.directadmin.com is dead
files5.directadmin.com is dead
files6.directadmin.com is dead
files7.directadmin.com is dead
Total test duration: 6 seconds

Fastest server is  at 0 B/s
Unable to determine fastest server
[root@vps1 custombuild]# LANG=C ./build set_fastest
File already exists:    servers.txt
MD5 Checksum on servers.txt passed.
Testing with file 10.kb:
42393 B/s       - files.directadmin.com
23654 B/s       - files2.directadmin.com
62873 B/s       - files5.directadmin.com
86425 B/s       - files6.directadmin.com
31334 B/s       - files7.directadmin.com
Total test duration: 3 seconds

Testing with file 100.kb:
83251 B/s       - files.directadmin.com
97075 B/s       - files2.directadmin.com
212992 B/s      - files5.directadmin.com
209920 B/s      - files6.directadmin.com
files7.directadmin.com is dead
Total test duration: 8 seconds

Fastest server is files5.directadmin.com at 212992 B/s
Changed downloadserver option from files2.directadmin.com to files5.directadmin.com


Does that mean, we should use it in command line? And run like this:

Code:
LANG=C ./build set_fastest

?
 
What locale are you using?

Code:
[root@vps1 custombuild]# env | grep LANG
LANG=ru_RU.UTF-8
[root@vps1 custombuild]#

If I use en_EN.UTF-8 or C, that's ok for me too. But some servers are localized.
 
this worked now for me
Code:
>LANG=C ./build set_fastest
File already exists:    servers.txt
MD5 Checksum on servers.txt passed.
Testing with file 10.kb:
66867 B/s       - files.directadmin.com
32665 B/s       - files2.directadmin.com
60313 B/s       - files5.directadmin.com
355328 B/s      - files6.directadmin.com
48128 B/s       - files7.directadmin.com
Total test duration: 3 seconds

Testing with file 100.kb:
135168 B/s      - files.directadmin.com
135168 B/s      - files2.directadmin.com
files5.directadmin.com is dead
898048 B/s      - files6.directadmin.com
219136 B/s      - files7.directadmin.com
Total test duration: 5 seconds

Fastest server is files6.directadmin.com at 898048 B/s
Changed downloadserver option from files.directadmin.com to files6.directadmin.com

Code:
>env | grep LANG
LANG=it_IT.UTF-8
 
Hello,

I don't mind adding LANG=C into the code if it's needed, but can someone explain how exactly this affects the wget or perl calls? I'm not clear on why it's needed. (localized servers?)

John
 
Hello John,

on localized servers, this code:

Code:
speedtest()
{
    ${WGET} -O /dev/null --timeout=1 --tries=1 http://${1}/services/${2} 2>&1 | grep saved | cut -d\( -f2 | cut -d\) -f1
}

fails (grep returns nothing), because saved is never present in wget's output, it's substituted with a translated word. Something like this attached.

Regards,
Alex.
 

Attachments

  • localized-wget.jpg
    localized-wget.jpg
    25.2 KB · Views: 183
Thanks John,

I'm sorry I was not enough clear from the beginning of the topic.

Alex.
 
Back
Top