I simply use vnstat and the command ``` vnstat -d
#!/bin/bash vnstat -d > /tmp/$(date +%F-%T)-DLs gedit /tmp/*DLs
Try it, you'll see what I mean. You don't have to use /tmp for the txt file if you want to keep it; you could put it in /home just as easily, but I did it this way so the file disappears on rebooting, but can be saved to /home very quickly.
Here's the output of my use of this system with a lot of the lines deleted for space saving.
eth0 / daily
day rx | tx | total ------------------------+-------------+---------------------------------------- 10.03. 38.95 MB | 4.69 MB | 43.64 MB 11.03. 1.05 GB | 49.91 MB | 1.10 GB %%%%%%%%%%%%: 12.03. 260.51 MB | 15.24 MB | 275.74 MB %%% ----- 07.04. 142.68 MB | 8.43 MB | 151.11 MB % 08.04. 15.93 MB | 4.03 MB | 19.96 MB ------------------------+-------------+---------------------------------------- estimated 16 MB | 4 MB | 20 MB