View Full Version : build set_fastest => all servers are dead
zEitEr
01-13-2011, 04:09 AM
Hello,
I've just noticed new feature in custombuild:
./build set_fastest
# ./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.
zEitEr
01-31-2011, 09:42 AM
Not fixed yet:
[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
mr.applesauce
02-01-2011, 12:14 PM
I dunno why someone would ever code it to require the bc command.
Tons of if statements are also missing quotes.
DirectAdmin Support
02-12-2011, 08:12 PM
Hello,
I've updated the code to use perl, as it's got a much higher likelyhood of existing over bc.
John
zEitEr
02-12-2011, 11:06 PM
Hello John,
OK, can't wait to test it. It's not published yet?
Regards,
Alex.
DirectAdmin Support
02-13-2011, 12:28 AM
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:
downloadserver=files.directadmin.comin 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
SeLLeRoNe
02-14-2011, 02:24 AM
Hi John,
ive edited the option file as described:
>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)
>./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
zEitEr
02-14-2011, 03:03 AM
Jello John,
LANG=C was not added into build script:
[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:
LANG=C ./build set_fastest
?
localhost
02-14-2011, 03:14 AM
Works OK for me.
files6.directadmin.com :)
zEitEr
02-14-2011, 03:19 AM
What locale are you using?
[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.
SeLLeRoNe
02-14-2011, 03:57 AM
this worked now for me
>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
>env | grep LANG
LANG=it_IT.UTF-8
DirectAdmin Support
02-14-2011, 01:47 PM
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
zEitEr
02-14-2011, 07:16 PM
Hello John,
on localized servers, this 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.
DirectAdmin Support
02-14-2011, 08:14 PM
Thanks for the clarification.
I've updated the code to have a global LANG=C
John
zEitEr
02-14-2011, 09:01 PM
Thanks John,
I'm sorry I was not enough clear from the beginning of the topic.
Alex.
SeLLeRoNe
02-15-2011, 12:07 AM
Thanks for the update.
Now work perfectly!
interfasys
02-15-2011, 05:00 PM
Well done zEitEr :)
Powered by vBulletin™ Version 4.0.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.