On vnstat
I can get the month, day, hour or top 10 days network usage. Is there anyway that I can get the network usage from specific date on the terminal? by vnstat or another tool?
Edit:
I want to have the usage from specific date to the current date or between two dates not only a specific date.
vnStat supports date and time range specific queries for all list outputs starting from version 2.0 (currently available as beta). That version also allows free configuration of data retention durations so there's no more hardcoded 30 day limit for daily data. See the change notes and the GitHub repository for more details.
Copy the code below into a file. I'm using
~/bin/vnstat-hist.sh
. After saving the file mark it as executable using:To run the script call it with the parameter for number of days. For example for today use
vnstat-hist.sh 1
. For last five days (including today) use:vnstat-hist.sh
Bash scriptNote this program can be shorter but hopefully the design is easier to follow for novices.