Sponsored Content
Top Forums Shell Programming and Scripting WGET command retrying to get response Post 302613613 by Corona688 on Tuesday 27th of March 2012 01:16:01 PM
Old 03-27-2012
From man wget:

Code:
       -t number
       --tries=number
           Set number of retries to number.  Specify 0 or inf for infinite
           retrying.  The default is to retry 20 times, with the exception of
           fatal errors like "connection refused" or "not found" (404), which
           are not retried.

You'll probably also be interested in
Code:
       -T seconds
       --timeout=seconds
           Set the network timeout to seconds seconds.  This is equivalent to
           specifying --dns-timeout, --connect-timeout, and --read-timeout,
           all at the same time.

           When interacting with the network, Wget can check for timeout and
           abort the operation if it takes too long.  This prevents anomalies
           like hanging reads and infinite connects.  The only timeout enabled
           by default is a 900-second read timeout.  Setting a timeout to 0
           disables it altogether.  Unless you know what you are doing, it is
           best not to change the default timeout settings.

           All timeout-related options accept decimal values, as well as sub-
           second values.  For example, 0.1 seconds is a legal (though unwise)
           choice of timeout.  Subsecond timeouts are useful for checking
           server response times or for testing network latency.

This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Response Code using wget in shell

I am trying to get the status code of a web request,size of the download file and response time using wget. When i use the command: wget <sitename> ,it gives all these parameters in the command line.But i want to get these values seperately and assign in different variables using shell script.Is... (2 Replies)
Discussion started by: rajbal
2 Replies

2. UNIX for Dummies Questions & Answers

'less' command response is garbled

Helo , I m using RHEL 4. If I run 'ls -laF | more', response is properly display. but when I run If I run 'ls -laF | less', the response is garbled what to do to remove this? Regards, Amit (4 Replies)
Discussion started by: amitpansuria
4 Replies

3. Shell Programming and Scripting

Setting array equal to command response

normally when i type: condor_q | tail -1 command line returns: 0 jobs; 0 idle, 0 running, 0 held I want use the number in front of 'running' in a series of equality tests to submit more jobs when my queue gets low. Someone showed me how to do it a few days ago by setting an array equal to... (4 Replies)
Discussion started by: pattywac
4 Replies

4. Shell Programming and Scripting

scp command and no response

I should trasfer some files by xxx.xxx.xxx.xxx to local host. In order to check the function works i tried to transfer a single file and I typed: scp -P 21 username@xxx.xxx.xxx.xxx:/filename.nas /filename.nas At this point i haven't response anch i have to type CTRL+C to return to... (2 Replies)
Discussion started by: andreac81
2 Replies

5. Shell Programming and Scripting

Retrying a remote connection after failure

Hi all, I am new to this forum and want an urgent help from you experts. I am currently using SunOs 5.10. I have a .cfi file which contains some commands to be executed in a node(MSC node in telecom) To connect to a node (for eg node name is MSC1) we have a shell script that has the... (5 Replies)
Discussion started by: interceptor16
5 Replies

6. Shell Programming and Scripting

Capture http response code from wget

Hi All, I am using wget to call a url..i am getting 202 if it is successful. if not i am forcing the response code to 417. how can i capture the response code and print 0 if it is 202 and 1 if it is not 202 any ideas, please share Thanks, Jack. (2 Replies)
Discussion started by: jack3698
2 Replies

7. Shell Programming and Scripting

How to skip command if it is hanging while waiting for response

Hello, I have a script that contains the command "whois 1.2.3.4" Sometimes this command takes far too long to produce any output and as a result the rest of the script is not executed. Can anyone suggest a method so that if no output is produced after say 2 seconds the script skips that... (2 Replies)
Discussion started by: colinireland
2 Replies

8. Solaris

Retrying Host Configuration

I'm trying to run from a generic Sun-OS and am getting the title message repeated indefinitely. I just want to get into the file system to disable some errors I made earlier. Any help? (2 Replies)
Discussion started by: PeterGuerilla
2 Replies

9. Shell Programming and Scripting

Wget command help

hi, i need help for downloading excel file from internet and convert it to text file wget http://spreadsheetpage.com/downloads/xl/wordfrequency.xls (4 Replies)
Discussion started by: raghur77
4 Replies

10. Shell Programming and Scripting

Vi / vim - Insert a external command response

I would like to execute and external command and insert it into a particular area of the file I am editing. Note that I have the ORIGINAL AT&T vi training doc dated 1987. Doesnt explain it. As an example, in a vi editor I have I would like the result : After executing the following... (1 Reply)
Discussion started by: popeye
1 Replies
SSL_CTX_set_timeout(3)						      OpenSSL						    SSL_CTX_set_timeout(3)

NAME
SSL_CTX_set_timeout, SSL_CTX_get_timeout - manipulate timeout values for session caching SYNOPSIS
#include <openssl/ssl.h> long SSL_CTX_set_timeout(SSL_CTX *ctx, long t); long SSL_CTX_get_timeout(SSL_CTX *ctx); DESCRIPTION
SSL_CTX_set_timeout() sets the timeout for newly created sessions for ctx to t. The timeout value t must be given in seconds. SSL_CTX_get_timeout() returns the currently set timeout value for ctx. NOTES
Whenever a new session is created, it is assigned a maximum lifetime. This lifetime is specified by storing the creation time of the ses- sion and the timeout value valid at this time. If the actual time is later than creation time plus timeout, the session is not reused. Due to this realization, all sessions behave according to the timeout value valid at the time of the session negotiation. Changes of the timeout value do not affect already established sessions. The expiration time of a single session can be modified using the SSL_SESSION_get_time(3) family of functions. Expired sessions are removed from the internal session cache, whenever SSL_CTX_flush_sessions(3) is called, either directly by the applica- tion or automatically (see SSL_CTX_set_session_cache_mode(3)) The default value for session timeout is decided on a per protocol basis, see SSL_get_default_timeout(3). All currently supported proto- cols have the same default timeout value of 300 seconds. RETURN VALUES
SSL_CTX_set_timeout() returns the previously set timeout value. SSL_CTX_get_timeout() returns the currently set timeout value. SEE ALSO
ssl(3), SSL_CTX_set_session_cache_mode(3), SSL_SESSION_get_time(3), SSL_CTX_flush_sessions(3), SSL_get_default_timeout(3) 0.9.7d 2002-12-01 SSL_CTX_set_timeout(3)
All times are GMT -4. The time now is 08:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy