|
From: Zinger on 2 Apr 2008 10:24 Hi All, I want to execute a shell script which returns the response time from a URL (using wget(?)). Can this be done through a shell script and how? The OS in linux. Thanks in advance, ZM
From: Ed Morton on 2 Apr 2008 10:42 On 4/2/2008 9:24 AM, Zinger wrote: > Hi All, > > I want to execute a shell script which returns the response time from > a URL (using wget(?)). Can this be done through a shell script and > how? The OS in linux. "time" may be all you need: $ time curl http://www.gnu.org/index.html >/dev/null 2>&1 real 0m0.304s user 0m0.030s sys 0m0.077s Depends what you're really looking for... Regards, Ed.
From: pk on 2 Apr 2008 11:06 Zinger wrote: > Hi All, > > I want to execute a shell script which returns the response time from > a URL (using wget(?)). Can this be done through a shell script and > how? The OS in linux. Don't know what you mean by "response time", however try this: $ time wget your://url.here -- All the commands are tested with bash and GNU tools, so they may use nonstandard features. I try to mention when something is nonstandard (if I'm aware of that), but I may miss something. Corrections are welcome.
From: Chris Mattern on 2 Apr 2008 11:43 On 2008-04-02, Zinger <zmasood(a)gmail.com> wrote: > Hi All, > > I want to execute a shell script which returns the response time from > a URL (using wget(?)). Can this be done through a shell script and > how? The OS in linux. > > > Thanks in advance, > > ZM > time wget http://example.com/website -- Christopher Mattern NOTICE Thank you for noticing this new notice Your noticing it has been noted And will be reported to the authorities
From: Zinger on 2 Apr 2008 12:12
On Apr 2, 11:43 am, Chris Mattern <sys...(a)sumire.gwu.edu> wrote: > On 2008-04-02, Zinger <zmas...(a)gmail.com> wrote:> Hi All, > > > I want to execute a shell script which returns the response time from > > a URL (using wget(?)). Can this be done through a shell script and > > how? The OS in linux. > > > Thanks in advance, > > > ZM > > time wgethttp://example.com/website > > -- > Christopher Mattern > > NOTICE > Thank you for noticing this new notice > Your noticing it has been noted > And will be reported to the authorities Hi, Thanks. As I mentioned, I am interested in how quickly the page I am trying to get opens up. So would "time" get me the response time from the URL? e.g. how long did the cnn.com page took to say open up (just as in it would have opened through a browser) in the example below? If yes then what is the value of response time? Is it 0.411seconds? ================== time wget cnn.com --12:07:27-- http://cnn.com/ => `index.html' Resolving cnn.com... 64.236.16.20, 64.236.16.52, 64.236.24.12, ... Connecting to cnn.com[64.236.16.20]:80... connected. HTTP request sent, awaiting response... 302 Found Location: http://www.cnn.com/ [following] --12:07:27-- http://www.cnn.com/ => `index.html' Resolving www.cnn.com... 64.236.24.12, 64.236.29.120, 64.236.91.21, ... Connecting to www.cnn.com[64.236.24.12]:80... connected. HTTP request sent, awaiting response... 200 OK Length: 91,412 [text/html] 100% [==================================================================================================>] 91,412 495.93K/s 12:07:27 (494.95 KB/s) - `index.html' saved [91,412/91,412] real 0m0.411s user 0m0.003s sys 0m0.002s ========================== |