Created
October 18, 2013 10:42
-
-
Save 1951FDG/7761f544b5dad3a7db12 to your computer and use it in GitHub Desktop.
Bandwidth monitoring with vnstat on Linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo nano /etc/init.d/vnstat | |
sudo vnstat -u | |
sudo vnstatd -d -s | |
vnstat -i ppp0 -l | |
vnstat --help | |
cd '/etc/init.d' | |
sudo nano | |
sudo chmod +x '/etc/init.d/vnstati' | |
sudo ln -s '/etc/init.d/vnstati' '/etc/rc0.d/K10vnstati' | |
sudo ln -s '/etc/init.d/vnstati' '/etc/rc6.d/K10vnstati' | |
#!/bin/sh | |
cd '/home/carmen/Escritorio' | |
for y in $(date '+%Y') | |
do | |
mkdir $y | |
cd $y | |
vnstati -i ppp0 -s -o $(date '+%m') | |
cd .. | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment