You are not logged in.

#1 2010-11-04 11:49:52

valvet
Member
From: Denmark
Registered: 2009-06-06
Posts: 147

[SOLVED] Bash scripting - figure out how much you've downloaded

Hi

How would I aproach displaying how much (in mb/kb/gb whatever) I've downloaded?

Thanks

Last edited by valvet (2010-11-04 13:10:13)

Offline

#2 2010-11-04 12:32:36

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] Bash scripting - figure out how much you've downloaded

something like this should get you started. posty is a postfix calculator I wrote, so you'll need to rearrange those subshells accordingly (or get posty from my github).

Offline

#3 2010-11-04 12:46:09

valvet
Member
From: Denmark
Registered: 2009-06-06
Posts: 147

Re: [SOLVED] Bash scripting - figure out how much you've downloaded

Excellent, I'll check both out - thanks :-)

Offline

#4 2010-11-04 13:19:41

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Bash scripting - figure out how much you've downloaded

There's also http://www.archlinux.org/packages/?sort … =&limit=50

[karol@black ~]$ vnstat -d

 eth0  /  daily

         day         rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
      10/02/10    525.89 MiB |   28.77 MiB |  554.66 MiB |   52.59 kbit/s
      10/03/10    850.30 MiB |   20.01 GiB |   20.84 GiB |    2.02 Mbit/s
      10/04/10    353.02 MiB |   20.26 MiB |  373.28 MiB |   35.39 kbit/s
      10/05/10    601.78 MiB |   42.41 MiB |  644.19 MiB |   61.08 kbit/s
      10/06/10    471.46 MiB |   26.29 MiB |  497.75 MiB |   47.19 kbit/s
      10/07/10    312.86 MiB |   15.24 MiB |  328.10 MiB |   31.11 kbit/s
      10/08/10    250.51 MiB |   13.85 MiB |  264.36 MiB |   25.07 kbit/s
      10/09/10    456.25 MiB |   22.86 MiB |  479.11 MiB |   45.43 kbit/s
      10/10/10      1.21 GiB |   43.15 MiB |    1.25 GiB |  121.82 kbit/s
      10/11/10    442.58 MiB |   21.45 MiB |  464.02 MiB |   44.00 kbit/s
      10/12/10    757.99 MiB |   33.45 MiB |  791.44 MiB |   75.04 kbit/s
      10/13/10    274.19 MiB |   18.22 MiB |  292.41 MiB |   27.72 kbit/s
      10/14/10      1.11 GiB |   48.94 MiB |    1.16 GiB |  112.59 kbit/s
      10/15/10      1.08 GiB |   42.71 MiB |    1.12 GiB |  108.95 kbit/s
      10/16/10    921.70 MiB |   32.01 MiB |  953.71 MiB |   90.43 kbit/s
      10/17/10    929.25 MiB |   37.68 MiB |  966.94 MiB |   91.68 kbit/s
      10/18/10      1.78 GiB |   73.96 MiB |    1.85 GiB |  179.53 kbit/s
      10/19/10    391.16 MiB |   19.23 MiB |  410.39 MiB |   38.91 kbit/s
      10/20/10      1.30 GiB |   42.81 MiB |    1.34 GiB |  130.33 kbit/s
      10/21/10      2.67 GiB |   77.57 MiB |    2.75 GiB |  267.06 kbit/s
      10/22/10      1.17 GiB |   36.96 MiB |    1.21 GiB |  117.29 kbit/s
      10/23/10      3.91 GiB |  104.04 MiB |    4.01 GiB |  389.56 kbit/s
      10/24/10      4.43 GiB |  124.12 MiB |    4.55 GiB |  441.50 kbit/s
      10/25/10      2.48 GiB |   71.18 MiB |    2.55 GiB |  247.22 kbit/s
      10/26/10      7.25 GiB |  146.55 MiB |    7.39 GiB |  717.75 kbit/s
      10/27/10      0.98 GiB |   35.87 MiB |    1.02 GiB |   98.78 kbit/s
      10/28/10      1.22 MiB |     599 KiB |    1.81 MiB |    0.17 kbit/s
      11/02/10      1.77 GiB |   30.93 MiB |    1.80 GiB |  174.33 kbit/s
      11/03/10    961.69 MiB |   44.55 MiB |    0.98 GiB |   95.41 kbit/s
      11/04/10      1.09 GiB |   44.35 MiB |    1.13 GiB |  170.49 kbit/s
     ------------------------+-------------+-------------+---------------
     estimated      1.69 GiB |      68 MiB |    1.76 GiB |
[karol@black ~]$ vnstat -m

 eth0  /  monthly

       month        rx      |     tx      |    total    |   avg. rate
    ------------------------+-------------+-------------+---------------
      Feb '10     66.99 GiB |    4.72 GiB |   71.71 GiB |  248.65 kbit/s
      Mar '10     31.77 GiB |    2.68 GiB |   34.45 GiB |  107.89 kbit/s
      Apr '10     28.77 GiB |    2.50 GiB |   31.26 GiB |  101.18 kbit/s
      May '10      6.38 GiB |  682.79 MiB |    7.05 GiB |   22.08 kbit/s
      Jun '10      6.10 GiB |  347.45 MiB |    6.44 GiB |   20.83 kbit/s
      Jul '10     41.02 GiB |    1.73 GiB |   42.75 GiB |  133.89 kbit/s
      Aug '10     49.31 GiB |    2.91 GiB |   52.21 GiB |  163.52 kbit/s
      Sep '10     14.49 GiB |  939.38 MiB |   15.40 GiB |   49.85 kbit/s
      Oct '10     41.93 GiB |   21.36 GiB |   63.29 GiB |  198.21 kbit/s
      Nov '10      3.79 GiB |  119.83 MiB |    3.91 GiB |  104.14 kbit/s
    ------------------------+-------------+-------------+---------------
    estimated     31.21 GiB |     979 MiB |   32.17 GiB |

Offline

Board footer

Powered by FluxBB