Results 1 to 12 of 12
  1. #1

    Thumbs up Script to test how much a page consumes in bandwidth?

    I just need a Perl / Python script to see how much viewing a particular page eats up in bandwidth. Any ideas?

  2. #2
    Join Date
    Nov 2010
    Location
    Arizona
    Posts
    297
    Something like this:

    Code:
    <?php
    ob_start();
    print "this is some output!";
    print "this is more output!";
    $bytes = ob_get_length(); // Amount of bandwidth used
    ob_end_flush();
    ?>

  3. #3
    No I mean to see how much my customer's page uses by each of their domains per visitor to get a good idea of allocating bandwidth for a shared VPS.

  4. #4
    Join Date
    Jan 2011
    Location
    Canada
    Posts
    934
    Install firebug (firefox). Under the Net tab, it'll show you the total requests in count and KB. It shows by time, by cache, and it'll even tell you your horoscope.

  5. #5
    Join Date
    Jan 2011
    Location
    Canada
    Posts
    934
    Ah, I noticed now you might have wanted to do it across multiple domains automatically. In which case, create a new page that will call httprequest on each domain in question. Load the result into a div or some disposable container. Firebug will keep a tally and hopefully survive long enough to give you something usable.

  6. #6
    I don't use Firefox so thats why I asked for a script

  7. #7
    Join Date
    Mar 2010
    Posts
    34
    That would not require a script .
    You can simply open the page in question . Then simply save the page for offline viewing , and wherever you save it , just check the file size , that should be it .

    In firefox(if you decide to use it that is) , you could alternatively use page info option to check out each and every element present on the page and it's size without having to even save the page offline .
    Although , if you're looking to do this for multiple pages , then doing each page one by one would be foolish .
    A php script in that case might do it...

  8. #8
    Join Date
    Jan 2011
    Location
    Canada
    Posts
    934
    I suggested firefox/firebug to capture AJAX requests too. That said, those websites are probably a minority anyways.

  9. #9
    I love how I request a banana, a specific type, and all of you suggest apples, oranges and mangos. I was specifically looking for a command line Perl or Python script, not a Firefox addon because Firefox is garbage.

  10. #10
    Join Date
    Mar 2010
    Posts
    34
    You don't seem very fond of php it seems...

    For python , try a google search(google itself runs on python) ,there might tonnes of Python scripts that might fully or partly satisfy your requirements readily .

  11. #11
    Join Date
    Sep 2009
    Posts
    361
    Quote Originally Posted by bsdvps View Post
    I love how I request a banana, a specific type, and all of you suggest apples, oranges and mangos. I was specifically looking for a command line Perl or Python script, not a Firefox addon because Firefox is garbage.
    That is like a homeless man asking for steak when someone is offering what they can. In this case they are offering what they know and you want the steak.

    Anyway you could use iftop and just look for your IP address in it? It has been a while, but you maybe able to sort or filter for a specific IP.
    Last edited by XLT_Frank; 02-22-2011 at 12:42 PM.

  12. #12
    Quote Originally Posted by fkatzenb View Post
    That is like a homeless man asking for steak when someone is offering what they can. In this case they are offering what they know..
    It would be like a person requesting a Linux server and you suggesting to them a Windows server.

Similar Threads

  1. Resource Consumption | Who consumes The most?
    By hosting guru in forum Web Hosting
    Replies: 9
    Last Post: 04-14-2009, 02:40 PM
  2. Replies: 2
    Last Post: 04-12-2006, 04:02 AM
  3. PHP script for page to include another random page.
    By N8Webs in forum Web Design and Content
    Replies: 18
    Last Post: 03-13-2006, 05:38 PM
  4. my domain name first page is apache 2 test page
    By skyaus in forum Dedicated Server
    Replies: 1
    Last Post: 01-17-2006, 09:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •