Query HTTP server


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.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.
PaulmulAuthor Commented:
Can this be done in perl?  I am using perl and bash for this.
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

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PaulmulAuthor Commented:
I am also quite new to perl, I prefer it to C though
try curl, works great.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.