Check fastest server and using it


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Check fastest server and using it
# 1  
Old 11-05-2014
Check fastest server and using it

hello
we have upload some data in 15 servers in usa asia ...
i consider to add new feature , script can detect download speed between localhost and destination and use fastest server,

i have cut this part from a script which have this feature, download a xx MB file from all its source and check speed, and use fastest one:

Code:
echo -n "Would you like to search for the fastest download mirror? (y/n): ";
                read yesno;
                if [ "$yesno" = "y" ]; then
                    $BUILD set_fastest;
            
            if [ -s "${CB_OPTIONS}" ]; then
                DL=`grep ^downloadserver= ${CB_OPTIONS} | cut -d= -f2`
                if [ "${DL}" != "" ]; then
                    SERVER=http://${DL}/services
                    FTP_HOST=${DL}
                fi
            fi
                fi

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

The Fastest for copy huge data

Dear Experts, I would like to know what's the best method for copy data around 3 mio (spread in a hundred folders, size each file around 1kb) between 2 servers? I already tried using Rsync and tar command. But using these command is too long. Please advice. Thanks Edy (11 Replies)
Discussion started by: edydsuranta
11 Replies

2. Shell Programming and Scripting

Fastest way calculating directory

Hi expert, Is there any fastest way to calculate recursive directory, and I have total 600 directories have 100000 files and 10 directory approximately 9000000 - 10000000 each files per directory. currently using this command "du -k --max-depth=0" to get the size but very slow it take 24 hours... (9 Replies)
Discussion started by: rufino
9 Replies

3. Programming

Fastest way to find the length of string in c

Hi all, We use strlen() fun provided by library to find the length of a string. Looking inside of it, it has some different mechanism to find the length of string. Normally, we scan the string byte by byte until the '\0' character. It takes a logn time to count length. The Library strlen()... (2 Replies)
Discussion started by: yogeshrl9072
2 Replies

4. Solaris

The FASTEST copy method?

Hi Experts, I've been asked if there is a fast way to duplicate a file(10GB) and zip it at the same time. The zipped file would be FTP'd.....management is asking this. Maybe there is a better method all together? any ideas? CP will not cut it. Thanks in advance Harley (1 Reply)
Discussion started by: Harleyrci
1 Replies

5. Shell Programming and Scripting

Fastest way to delete line

I have a 5 GB text file(log/debug) I want to delete all lines containing 'TRACE' Command used sed -i '/TRACE/d' mylog.txt Is there any other fastest way to do this? (1 Reply)
Discussion started by: johnbach
1 Replies

6. UNIX for Advanced & Expert Users

Fastest way for searching the file

I want to search a file in fastest manner. Presently I am using 'find' command. But it is taking around 15min for searching. Is there any other method through which I can do it fast? (3 Replies)
Discussion started by: vaibhavbhat
3 Replies

7. Shell Programming and Scripting

how to delete/remove directory in fastest way

hello i need help to remove directory . The directory is not empty ., it contains several sub directories and files inside that.. total number of files in one directory is 12,24,446 . rm -rf doesnt work . it is prompting for every file .. i want to delete without prompting and... (6 Replies)
Discussion started by: getdpg
6 Replies

8. UNIX for Dummies Questions & Answers

Fastest way to traverse through large directories

Hi! I have thousands of sub-directories, and hundreds of thousands of files in them. What is the fast way to find out which files are older than a certain date? Is the "find" command the fastest? Or is there some other way? Right now I have a C script that traverses through and checks... (5 Replies)
Discussion started by: sreedharange
5 Replies

9. Shell Programming and Scripting

fastest way to remove duplicates.

I have searched the FAQ - by using sort, duplicates, etc.... but I didn't get any articles or results on it. Currently, I am using: sort -u file1 > file2 to remove duplicates. For a file size of 1giga byte approx. time taken to remove duplicates is 1hr 21 mins. Is there any other faster way... (15 Replies)
Discussion started by: radhika
15 Replies

10. UNIX for Dummies Questions & Answers

fastest copy command

wich is the fastest command in HP-UX to copy an entire disk to dat tapes, or even disk to disk? thanks (0 Replies)
Discussion started by: vascobrito
0 Replies
Login or Register to Ask a Question
AXEL(1) 						      General Commands Manual							   AXEL(1)

NAME
Axel - A light download accelerator for Linux. SYNOPSIS
axel [OPTIONS] url1 [url2] [url...] DESCRIPTION
Axel is a program that downloads a file from a FTP or HTTP server through multiple connection, each connection downloads its own part of the file. Unlike most other programs, Axel downloads all the data directly to the destination file, using one single thread. It just saves some time at the end because the program doesn't have to concatenate all the downloaded parts. OPTIONS
One argument is required, the URL to the file you want to download. When downloading from FTP, the filename may contain wildcards and the program will try to resolve the full filename. Multiple URL's can be specified as well and the program will use all those URL's for the download. Please note that the program does not check whether the files are equal. Other options: --max-speed=x, -s x You can specify a speed (bytes per second) here and Axel will try to keep the average speed around this speed. Useful if you don't want the program to suck up all of your bandwidth. --num-connections=x, -n x You can specify an alternative number of connections here. --output=x, -o x Downloaded data will be put in a local file with the same name, unless you specify a different name using this option. You can spec- ify a directory as well, the program will append the filename. --search[=x], -S[x] Axel can do a search for mirrors using the filesearching.com search engine. This search will be done if you use this option. You can specify how many different mirrors should be used for the download as well. The search for mirrors can be time-consuming because the program tests every server's speed, and it checks whether the file's still available. --no-proxy, -N Don't use any proxy server to download the file. Not possible when a transparent proxy is active somewhere, of course. --verbose If you want to see more status messages, you can use this option. Use it more than once if you want to see more. --quiet, -q No output to stdout. --alternate, -a This will show an alternate progress indicator. A bar displays the progress and status of the different threads, along with current speed and an estimate for the remaining download time. --header=x, -H x Add an additional HTTP header. This option should be in the form "Header: Value". See RFC 2616 section 4.2 and 14 for details on the format and standardized headers. --user-agent=x, -U x Set the HTTP user agent to use. Some websites serve different content based upon this parameter. The default value will include "Axel", its version and the platform. --help, -h A brief summary of all the options. --version, -V Get version information. NOTE
Long (double dash) options are supported only if your platform knows about the getopt_long call. If it does not (like *BSD), only the short options can be used. RETURN VALUE
The program returns 0 when the download was succesful, 1 if something really went wrong and 2 if the download was interrupted. If something else comes back, it must be a bug.. EXAMPLES
axel ftp://ftp.{be,nl,uk,de}.kernel.org/pub/linux/kernel/v2.4/linux-2.4.17.tar.bz2 This will use the Belgian, Dutch, English and German kernel.org mirrors to download a Linux 2.4.17 kernel image. axel -S4 ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-2.4.17.tar.bz2 This will do a search for the linux-2.4.17.tar.bz2 file on filesearching.com and it'll use the four (if possible) fastest mirrors for the download. (Possibly including ftp.kernel.org) (Of course, the commands are a single line, but they're too long to fit on one line in this page.) FILES
/etc/axelrc System-wide configuration file. Note that development versions place this file in /usr/local/etc. ~/.axelrc Personal configuration file These files are not documented in a man-page, but the example file which comes with the program contains enough information, I hope. The position of the system-wide configuration file might be different. COPYRIGHT
Axel is Copyright 2001-2002 Wilmer van der Gaast. BUGS
Please report bugs at https://alioth.debian.org/tracker/?group_id=100070&atid=413085. AUTHORS
Wilmer van der Gaast. <wilmer@gaast.net> AXEL(1)