LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to know total upload and download stats till date (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-know-total-upload-and-download-stats-till-date-879903/)

rahulkya 05-10-2011 03:47 PM

how to know total upload and download stats till date
 
I am thinking that Am I able to know how much data I received and sent till date since my MINT 9 ????
I wanted to know is there method that counts total stats of upload and download since I installed My linux...
System monitor is good for only one session..Once you restart the PC all gone.....

Thanks in Advance..

andrewthomas 05-10-2011 11:39 PM

From this date forward you can use iptables to keep track of your bandwidth totals.

The thing is, I believe that Mint uses ufw as a front-end to iptables, and I don't know how to save the counters using ufw.

First you need to configure iptables how you want it then save the rules to a file, for example /etc/iptables.rules

Then you need to set it up so they load at boot and save at shutdown.

One way you could restore your rules and counters is with a script in rc.local

Code:

#!/bin/bash
/sbin/iptables-restore -c < /etc/iptables.rules

or where you want to save your rules and you could put this file in /etc/init.d/rc.local making sure it is executable

and you could put another script in /etc/rcS.d/S50iptables with

Code:

#!/bin/bash
/sbin/iptables-save -c > /etc/iptables.rules

To save your counters and rules at shutdown.

You could check this out too
http://wiki.debian.org/iptables


All times are GMT -5. The time now is 09:35 AM.