cajun has asked for the wisdom of the Perl Monks concerning the following question:

I frequently hear my boss exclaim "I'm mad at our ISP today, Yahoo is slow".

I've finally heard enough of this and decided to write a script to prove whether it is the ISP's fault or Yahoo's fault or whatever.

My thoughts were to grab several web pages using LWP::Simple and time the length of time it took to grab each of the pages. Put the data into a file and develop a history from that. The script would be run from a cron job.

Is there a better method to test this ?

Thanks for any tips,

Replies are listed 'Best First'.
Re: Testing the connection to the net
by kschwab (Vicar) on Jan 09, 2001 at 18:57 UTC
    The best way I have found to answer these types of questions is to check response time to yahoo.com from a different location.

    An easy way to do this is the webperf.org monitoring page.

    They also offer source for their web response time monitoring agent (written in Perl) , which would allow you to break down the response into dns lookup time, first byte received, and page completion from your site.

    By coincidence, they happen to show historical response times for the yahoo home page on the webperf.org home page

    Good luck..

Re: Testing the connection to the net
by turnstep (Parson) on Jan 09, 2001 at 17:29 UTC
    You might want to look at Net::Ping for a quick and dirty test of connection speed.
      For a slightly better test you could try Net::Traceroute, so you can tell exactly whose fault it is.
Re (tilly) 1: Testing the connection to the net
by tilly (Archbishop) on Jan 09, 2001 at 20:03 UTC
    You generally need to be root to run it, it won't go through firewalls, etc. But try out the traceroute utility. Finding where there is a bottleneck is exactly what it is for.
Re: Testing the connection to the net
by Saint Aardvark (Acolyte) on Jan 10, 2001 at 01:42 UTC
    There's a Windows utility I read about, a pretty neat idea: traceroute from your box to somewhere else, run once every howevermany minutes, and graphing reponse times for each step of the way. Can't remember the name of it, but seems like a good idea. I've been meaning to look at writing something that'd do this, but maybe you'll beat me to it...:-)

    I am now blessing your keyboard...

Re: Testing the connection to the net
by cajun (Chaplain) on Jan 10, 2001 at 14:19 UTC
    Thanks for all of the replies / suggestions. Yes, I thought of ping, but that's really not a good indicator of how a given www server is operating nor how a given page is being sent is it ? I also thought of traceroute as well, but again, that is very similar to ping and wouldn't really show what I'm looking for.

    The webperf.org deal looks pretty good, but they were having troubles earlier and I couldn't see much of the site. Will check again later.

    Saint Aardvark, my keyboard and I thank you for your blessings, however, I think the task you hope my keyboard and I might accomplish is a bit too deep for me at this point. Perhaps your blessings might better be bestowed on someone like Merlyn (like he needs it). If I come up with some workable code for the task, I'll certainly post it.

    Thanks to all !