Solved

Query HTTP server

Posted on 2003-11-11
5
330 Views
Last Modified: 2010-03-18
Hi,

is there any way in bash to query the round trip time to a http server? I have to use the http protocol so ping is no good.  I have to compare this to ping. I thought wget might have something but I couldn't find what to use.

Thanks
0
Comment
Question by:Paulmul
  • 2
  • 2
5 Comments
 
LVL 2

Expert Comment

by:asbharadwaj
ID: 9721499
Iam not aware of any bash command for this purpose. But
You can write a small program that sends a HTTP Get request to the server
and measures the response time
Its really very simple
All you need to do is open a socket, connect to the server port 80 (or whatever the
server is listening to), note the time, send the http get request, wait for response,
note down time, calculate difference and you have the round trip time.
0
 
LVL 1

Author Comment

by:Paulmul
ID: 9721509
Can this be done in perl?  I am using perl and bash for this.
0
 
LVL 2

Accepted Solution

by:
asbharadwaj earned 40 total points
ID: 9722100
Well Yes
It can be done in Perl
Im a beginner in Perl and I dont know much about it and
Im much more comfortable with C.
However a good starting point will be
http://www.cs.cf.ac.uk/Dave/PERL/node169.html#SECTION001910000000000000000

Its a brief overview of various capabilities of Perl. Iam using this for Perl basics :-)
0
 
LVL 1

Author Comment

by:Paulmul
ID: 9722426
I am also quite new to perl, I prefer it to C though
0
 

Expert Comment

by:jared71
ID: 9732964
try curl, works great.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video discusses moving either the default database or any database to a new volume.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now