Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: How many that file have been downloaded ?

  1. #1
    Join Date
    Oct 2012
    Beans
    212
    Distro
    Ubuntu 12.04 Precise Pangolin

    How many that file have been downloaded ?

    Hi guys...i'm looking for a tool tells me information about a certain file like :

    1- how many that file have been downloaded ?
    2- How much the data have been transmitted 3MB 3GB...etc of a single file and the total of my server (ubuntu server) ?


    thank you .

  2. #2
    Join Date
    Oct 2008
    Location
    philippines
    Beans
    618
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How many that file have been downloaded ?

    ...there is download monitor in the software package...not sure if that works also for servers...am on desktop

  3. #3
    Join Date
    Jun 2007
    Location
    Porirua, New Zealand
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: How many that file have been downloaded ?

    You might be able to do some analysis of your log files. Which one you look at will depend on what kind of server you are running. Are you running a web page, or are you sharing files?
    Forum DOs and DON'Ts
    Never assume that information you find using a search engine is up-to-date.

  4. #4
    Join Date
    Oct 2012
    Beans
    212
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How many that file have been downloaded ?

    A web page and i'm running apache2 server .

  5. #5
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    8,843
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: How many that file have been downloaded ?

    To count up the number of downloads:

    Code:
    grep filename /var/log/apache2/access.log | wc -l
    Once you know the number of downloads the total amount of traffic is simply

    (number of downloads) X (size of file)
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  6. #6
    Join Date
    Apr 2008
    Location
    LOCATION=/dev/random
    Beans
    5,767
    Distro
    Ubuntu Development Release

    Re: How many that file have been downloaded ?

    For the total network utilization of your server you can use vnstat.
    Cheesemill

  7. #7
    Join Date
    Oct 2012
    Beans
    212
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How many that file have been downloaded ?

    Quote Originally Posted by SeijiSensei View Post
    To count up the number of downloads:

    Code:
    grep filename /var/log/apache2/access.log | wc -l
    Once you know the number of downloads the total amount of traffic is simply

    (number of downloads) X (size of file)
    But what about the downloads that didn't upload all their bits ?

  8. #8
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    8,843
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: How many that file have been downloaded ?

    The log records show the amount of traffic exchanged. For instance,

    Code:
    10.10.10.10 - - [06/Aug/2012:11:01:39 -0400] "GET /images/welcome.gif HTTP/1.1" 200 1533 "https://www.example.com/" "Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20100101 Firefox/14.0.1"
    The "1533" is the number of bytes transferred in response to that request. In this case it is the size of "welcome.gif".

    It's pretty rare that people cancel out in the middle of a download unless we're talking about files in the 100s of megabytes, and even then I'd be surprised if aborted downloads constituted more than a couple of percent of all transfers.

    One solution is to use a web log parser like analog. It will construct reports that include the number of transfers for each file and the total amount of traffic involved.
    Last edited by SeijiSensei; June 21st, 2013 at 03:00 AM.
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  9. #9
    Join Date
    Oct 2012
    Beans
    212
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How many that file have been downloaded ?

    Quote Originally Posted by SeijiSensei View Post
    The log records show the amount of traffic exchanged. For instance,
    Code:
    10.10.10.10 - - [06/Aug/2012:11:01:39 -0400] "GET /images/welcome.gif HTTP/1.1" 200 1533 "https://www.example.com/" "Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20100101 Firefox/14.0.1"
    The "1533" is the number of bytes transferred in response to that request. In this case it is the size of "welcome.gif". It's pretty rare that people cancel out in the middle of a download unless we're talking about files in the 100s of megabytes, and even then I'd be surprised if aborted downloads constituted more than a couple of percent of all transfers. One solution is to use a web log parser like analog. It will construct reports that include the number of transfers for each file and the total amount of traffic involved.
    Thank you that's a great advice *______*

  10. #10
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    8,843
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: How many that file have been downloaded ?

    Which "advice" exactly? Using analog?
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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