Re: BASH Script:displays total download usage in specified t
Posted: Sun Aug 05, 2012 8:15 am
This sums up net usage quite nicely by the hour...
You'll need to install something to make that work, I will leave that up to you to figure out.
Code: Select all
#!/bin/bash
echo "Tx (MiB) for this hour is" $(for i in `date +%H` ; do vnstat --dumpdb | \grep "h;$i" ; done | cut -c 17- | cut -d\; -f1)
echo "Rx (MiB) for this hour is" $(for i in `date +%H` ; do vnstat --dumpdb | \grep "h;$i" ; done | cut -c 17- | cut -d\; -f2)