summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add DSCRIPTREJECTED status for distfiles.Kostyantyn Ovechko2010-08-041-1/+10
|
* Add --wait-distfile=distfile_name option to cli of tuiclientKostyantyn Ovechko2010-08-041-3/+4
| | | | tuiclient checks distfile status, and returns when distfile is downloaded or not in the queue.
* Provide more info on distfiles to tuiclients.Kostyantyn Ovechko2010-08-031-1/+17
| | | | | Provide info on distfiles that are already in the list or just added, but not in progress (not started yet or already downloaded) to ui_server/tui_clients.
* Add distfiles window to tuiclient.Kostyantyn Ovechko2010-08-031-1/+5
| | | | Distfiles window shows progress on distfile downloads.
* Add [scripting_and_scheduling] section to segget.conf file.Kostyantyn Ovechko2010-07-301-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [scripting_and_scheduling] Segget provides Python scripting functionalyty to support scheduling. Each time segget tries to start a new connection certain network it calls a python script (client.py) to accept or reject this connection and if necessary adjusts its settings. PYTHON_PATH Define path to python Default: python_path=/usr/bin/python SCRIPTS_DIR Define a path to the dir with python scripts. Before establishing connection for a particular segment via network# segget checks SCRIPTS_DIR. If SCRIPTS_DIR contains net#.py file, segget will launch schedule() function from this file to apply settings for connetion and accept or reject this segment for the moment. net#.py file is a python script file with a user-writen schedule() function. It's necessary to import functions before using get("variable"), set("variable",value), accept_segment() and reject_segment() in schedule(). get() function can obtain values for the following variables: connection.num, connection.url, connection.max_speed_limit, network.num, network.mode, network.active_connections_count, distfile.name, distfile.size, distfile.dld_segments_count, distfile.segments_count, distfile.active_connections_count, segment.num, segment.try_num, segment.size, segment.range set() function can change connection.max_speed_limit, see example: -----------------EXAMPLE STARTS----------------- from functions import * import time; def schedule(): localtime = time.localtime(time.time()); hour=localtime[3]; # disable downloading distfiles that have size more than 5 000 000 bytes # from 8-00 to 22-00. if hour>8 and hour<22 and (get("distfile.size"))>5000000: print "reject because distfile is too big" reject_segment() # set speed limit 50 000 cps for distfiles larger than 1 000 000 bytes if get("distfile.size")>1000000: print "limit connection speed" set(connection.max_speed_limit, 50000) accept_segment() -----------------EXAMPLE ENDS----------------- From example above localtime returns following tuple: Index Attributes Values 0 tm_year e.i.: 2008 1 tm_mon 1 to 12 2 tm_mday 1 to 31 3 tm_hour 0 to 23 4 tm_min 0 to 59 5 tm_sec 0 to 61 (60 or 61 are leap-seconds) 6 tm_wday 0 to 6 (0 is Monday) 7 tm_yday 1 to 366 (Julian day) 8 tm_isdst -1, 0, 1, -1 means library determines DST Therefore localtime[3] provides hours. Segment will be accecpted by default if it was neither accepted nor rejected during the schedule() function. sagget saves logs of resulting stdout and stderr in the log folder separatly for each network. Hence, if there's an error in net3.py file python error message would be saved to net3_script_stderr.log. Results of print would be saved in net3_script_stdout.log. Default: scripts_dir=./scripts SCRIPT_SOCKET_PATH Segget uses AF_UNIX domain sockets for communication with python. Specify path for the socket on your filesystem. Default: script_socket_path=/tmp/segget_script_socket
* Add CoralCDN supportKostyantyn Ovechko2010-07-281-7/+14
| | | | | Add option to network#.conf files: [mode]
* Add segments counters to stats and tui.Kostyantyn Ovechko2010-07-271-0/+2
|
* Add log and error_log windows to tuiclientKostyantyn Ovechko2010-07-271-2/+1
|
* Check all set checksums, checksums are optionalKostyantyn Ovechko2010-07-261-23/+70
|
* Add to tui: ETA, AVG speed and active/total connectionsKostyantyn Ovechko2010-07-211-19/+42
|
* Fix: error with connection countersKostyantyn Ovechko2010-07-201-3/+7
|
* Fix: segget freezes while trying to download files via proxy-fetcherKostyantyn Ovechko2010-07-201-60/+49
|
* Improve network selection algorithm.Kostyantyn Ovechko2010-07-181-56/+110
| | | | | | | | | 0) Segget starts from the highest priority networks. 1) Segget tries local mirrors and mirrors provided by proxy-fetchers first. 2) If no success and requests to proxy-fetchers are allowed => segget selects proxy-fetcher and requests from it. 3) If proxy-fetcher replied that file has been downloaded => segget starts from step 1 again. 4) If no download started till now and remote-mirrors are allowed => segget selects a remote network and selects a mirror from it. 5) If no success on step 4, segget switches to lower priority networks
* Split provide_segment function into 3 partsKostyantyn Ovechko2010-07-181-113/+168
|
* Add responses from proxy-fetcther to its clientsKostyantyn Ovechko2010-07-181-42/+95
| | | | | | | | | R_PF_BE_MORE_PATIENT R_PF_ERROR_ADDING_TO_PROXY_QUEUE R_PF_ADDED_TO_PROXY_QUEUE R_PF_ALREADY_WAS_IN_QUEUE R_PF_DOWNLOADED R_PF_FAILED
* Implement check if distfile is already in the proxy-fetcher's queue. If so ↵Kostyantyn Ovechko2010-07-171-2/+4
| | | | don't add it.
* Add section [network_proxy_fetcher]Kostyantyn Ovechko2010-07-171-4/+4
| | | | | | | | | | | | | | PROXY_FETCHER_IP This option is active only when NETWORK_MODE=1, in other cases it's ignored. Specify IP addres of the proxy-fetcher Default: proxy_fetcher_ip=none PROXY_FETCHER_PORT This option is active only when NETWORK_MODE=1, in other cases it's ignored. Specify proxy-fetcher address Default: proxy_fetcher_port=3131
* Add to segget.conf file section [provide_proxy_fetcher_to_others].Kostyantyn Ovechko2010-07-141-84/+100
| | | | | | | | | | | | | | | | | | | | | NOTE: Proxy-fetcher downloads distfiles requested by other segget daemons. File will be ignored if it's already downloaded. TO-DO: Proxy-fetcher needs to check if distfile is already in the download list. [provide_proxy_fetcher_to_others] PROVIDE_PROXY_FETCHER_IP Define an ip address segget will use to provide access for tuiclients. The parameter should be a string holding your host dotted IP address. Default: provide_proxy_fetcher_ip=127.0.0.1 PROVIDE_PROXY_FETCHER_PORT Define a port segget will use to provide access for tuiclients. The parameter should be an integer. Minimum value: 1 Maximum value: 65535 Default: provide_proxy_fetcher_port=9777
* Move show_progress() to a threadKostyantyn Ovechko2010-07-101-36/+177
|
* Failprove .cpp files and log errors to error.logKostyantyn Ovechko2010-07-051-60/+76
|
* Failprove networkbroker.cpp and log errors to error.logKostyantyn Ovechko2010-07-041-5/+7
|
* Add option [provide_mirror_to_others].provide_mirror_files_restrict_list_on ↵Kostyantyn Ovechko2010-07-041-1/+11
| | | | | | | | | | | | to segget.conf file SYNOPSIS: PROVIDE_MIRROR_FILES_RESTRICT_LIST_ON= 0 | 1 If PROVIDE_MIRROR_DIR=none this option will be ignored. - If set to 1, segget will compare distfile name with the list of forbiden patterns from the restricted.conf file. If distfile name contains any of the patterns, no symlink will be provided to this distfile. Default: provide_mirror_files_restrict_list_on=0
* Add option [provide_mirror_to_others].provide_mirror_dirKostyantyn Ovechko2010-07-041-7/+66
| | | | | | | | [provide_mirror_to_others] PROVIDE_MIRROR_DIR Define a dir to store distfiles for mirroring. Default: provide_mirror_dir=./provide_mirror_dir
* Merge 2 vectors: network_array[network_num].mirror_list and ↵Kostyantyn Ovechko2010-07-041-2/+2
| | | | network_array[network_num].benchmarked_mirror_list
* Add option [network_mirrors].ONLY_LOCAL_WHEN_POSSIBLE to network#.conf files.Kostyantyn Ovechko2010-07-041-23/+35
| | | | | | | | | | | | SYNOPSIS: ONLY_LOCAL_WHEN_POSSIBLE=0 | 1 If NETWORK_USES_OWN_MIRROR_LIST_ONLY_ON=0 this option will be ignored. - If set to 1, segget will not use remote mirrors with equal or lower priority until all mirrors in network0_mirrors.conf file have failed. - If set to 0, segget will use remote mirrors with equal priority or mirrors with lower priority when this network has NO free connections (see option NETWORK_MAX_CONNECTIONS in [network_connections] section of this file). Default: only_local_when_possible=1
* Add support for local mirrorsKostyantyn Ovechko2010-07-041-17/+64
| | | | | | | | | | | network#.conf :: [network_mirrors] SYNOPSIS: NETWORK_USES_OWN_MIRROR_LIST_ONLY_ON=0 | 1 - If set to 1, segget will replace mirror list provided by portage system with the list from network1_mirrors.conf - If set to 0, segget will use ONLY mirror list provided by portage system, and will NOT use the list from network1_mirrors.conf file Default: use_own_mirror_list_only_on=0
* Add competitions among networks with equal priority levels.Kostyantyn Ovechko2010-07-031-4/+23
| | | | Network with the smallest active_connections_num wins.
* Add support for several networks to seggetKostyantyn Ovechko2010-07-031-66/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add [networks] section to segget.conf [networks] network0_priority=10 network1_priority=0 network2_priority=0 network3_priority=0 network4_priority=0 network5_priority=0 network6_priority=0 network7_priority=0 network8_priority=0 network9_priority=0 2) Following options moved from segget.conf to network#.conf [network_bind] bind_interface=none [network_connections] max_connections=2 connection_timeout=15 ftp_response_timeout=180 timeout=500 low_connection_speed_limit=1000 low_connection_speed_time=10 max_connection_speed=3000 [network_protocols] [network_user_data] user_agent=segget [network_proxy] proxy_ip_or_name=none proxy_port=3128 proxy_user=none proxy_password=none proxy_off=1 [network_mirrors] use_own_mirror_list_on=0
* Add option [pkg_list].del_pkg_list_when_dld_finishedKostyantyn Ovechko2010-06-301-0/+2
| | | | | | | | SYNOPSIS: del_pkg_list_when_dld_finished=0 | 1 - If del_pkg_list_when_dld_finished set to 1: Segget deletes pkg.list file, after all distfiles were successfuly fetched. Default: del_pkg_list_when_dld_finished=1
* Add option [connections].current_speed_time_interval_msecs to segget.confKostyantyn Ovechko2010-06-281-0/+25
| | | | | | | | | | | CURRENT_SPEED_TIME_INTERVAL_MSECS segget transfers may have bursty nature of their traffic. Therefore, while measuring current speed, segget actually calculates average speed during current_speed_time_interval_msecs time interval, defined in milliseconds. Min limit:100 Max limit: 60000 Default: current_speed_time_interval_msecs=1000
* Failprove distfile.cpp and log errors to error.logKostyantyn Ovechko2010-06-271-159/+211
|
* Add explanation for options [mirrors].use_benchmark_stats and ↵Kostyantyn Ovechko2010-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [mirrors].benchmark_oblivion SYNOPSIS: use_benchmark_stats=0 | 1 If use_benchmark_stats=1 statistics on mirrors is used to rate them and therefore improve performance. Each time connection from a particular mirror closes mirror->dld_time, and mirror->dld_size get increased (in case of unsuccessful connection only time gets increased), so avg speed for a mirror can be calculated: mirror->avg_speed=mirror->dld_size/mirror->dld_time. (1) When new segment is going to be started segget goes through the list of the mirrors distfile/segment has, and asks each mirror for self_rating: "ulong self_rating=mirror->mirror_on_the_wall();". This way segget chooses a mirror with the best self_rating. To calculate self_rating mirrors use the following formula: self_rating=dld_time/dld_size*honesty. (2) So mirrors actually say how bad they are. Even mirrors can have critical times, so to give mirrors another chance honesty was added to the formula (2). honesty can get values in interval (0,1]. Each time connection from a mirror opens or closes mirror sets its honesty=1. If mirror was asked for self_evaluation with mirror->mirror_on_the_wall(), but wasn't chosen its honesty decreases somewhat (see [mirror].benchmark_oblivion option), so next time it will lie little bit more about how bad it's. Default: use_benchmark_results=1 ***Note: at the moment use_benchmark_results can NOT be set to 0 BENCHMARK_OBLIVION benchmark_oblivion option allows to adjust how fast segget "forgets" benchmarking statistics on mirrors performance. Each time mirror->mirror_on_the_wall() called, mirror decreases its honesty (to have more chances next time) using the following formula: honesty=honesty*100/(100+settings.benchmark_oblivion) (3) Therefore, setting benchmark_oblivion=100 will make mirror look twice less bad next time mirror->mirror_on_the_wall() called. Default: benchmark_oblivion=5
* Change default values for settings.Kostyantyn Ovechko2010-06-241-7/+7
| | | | | | | | max_tries=10 ftp_response_timeout=180 timeout=500 max_connections_num_per_mirror=1 proxy_port=3128.
* Add Tmirror class for mirror benchmarking and option ↵Kostyantyn Ovechko2010-06-231-5/+44
| | | | | | | | [mirrors].max_connections_num_per_mirror Segget gathers stats on mirrors and uses it to rate them and therefore improve performance. settings.forgetness option (by default set to 5) allows to adjust how fast segget "forgets" about bad performance of a mirror.
* Add options [connections].connection_timeout, ↵Kostyantyn Ovechko2010-06-221-122/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [connections].ftp_response_timeout, [connections].timeout. Set the number of seconds to wait while trying to connect. Use 0 to wait indefinitely. Pass a long. It should contain the maximum time in seconds that you allow the connection to the server to take. This only limits the connection phase, once it has connected, this option is of no more use. Set to zero to disable connection timeout (it will then only timeout on the system's internal timeouts). See also the TIMEOUT option. default: connection_timeout=15 Set a timeout period (in seconds) on the amount of time that the server is allowed to take in order to generate a response message for a command before the session is considered hung. While awaiting for a response, this value overrides TIMEOUT. It is recommended that if used in conjunction with TIMEOUT, you set FTP_RESPONSE_TIMEOUT to a value smaller than TIMEOUT. default: ftp_response_timeout=5000 maximum amount of time to download segment in seconds Set the maximum number of seconds for a connection to execute. Pass a long as parameter containing the maximum time in seconds that you allow the transfer operation to take. Normally, name lookups can take a considerable time and limiting operations to less than a few minutes risk aborting perfectly normal operations. default: timeout=6000
* Add option [settings].max_segment_sizeKostyantyn Ovechko2010-06-221-4/+4
| | | | | | Define maximum segment size in bytes default: max_segment_size=500000
* Add option max_connection_num_per_distfile to segget.conf fileKostyantyn Ovechko2010-06-221-48/+42
| | | | | Each distfile can only have up to max_connection_num_per_distfile simultaneous connections.
* Add configuration file segget.confKostyantyn Ovechko2010-06-191-9/+11
|
* Add support for WHIRLPOOL, SHA512, MD5, CRC32Kostyantyn Ovechko2010-06-171-2/+2
|
* Add checking checksums for downloaded distfiles.Kostyantyn Ovechko2010-06-171-3/+25
| | | | | checksum.cpp file contains functions for RMD160, SHA1 and SHA256 checksums checks. libcrypto (libcrypto++) added to Makefile.
* Fix: error while combining files + error when number of segments to download ↵Kostyantyn Ovechko2010-06-161-5/+9
| | | | is less than MAX_CONNECTS.
* Delete segments after combining distfileKostyantyn Ovechko2010-06-161-2/+7
|
* Add skipping downloaded distfilesKostyantyn Ovechko2010-06-161-7/+36
|
* Combine segments together to recreate original distfiles.Kostyantyn Ovechko2010-06-161-2/+54
| | | | Segments from now stored at ./tmp, distfiles at ./distfile dirs.
* Add Tsegment.try_num - counter for attemps. + some minor fixesmona2010-06-151-6/+14
|
* Add measuring total and per connection speed.mona2010-06-151-22/+25
|
* Add Tsettings class. Settings include feature to skip fetching of downloaded ↵mona2010-06-141-7/+12
| | | | files
* Add curses ui.simka2010-06-121-1/+1
|
* Fix: pointer errror.simka2010-06-121-1/+1
|
* Restart segment if unsuccessful. Make distfiles->segments queue more correct.simka2010-06-111-136/+38
|