Monitoring Your Total Monthly Bandwidth Usage

This is how you can monitoring your bandwith, tidak ada cara yang lebih mudah memonitoring bandwith total secara keseluruhan pada sebuah interface kecuali pakai ifconfig dan vnstat

this is how you can have clear view how to answer this question

“How much bandwith my server consume each month ?”

“How much bandwith this eth0 interface consume every month / monthly ?”

“Ini server makan bandwith sebulan di interface eth1 sebenarnya berapa banyak ?”

install vnstat

#sudo apt-get install vnstat
or
#sudo yum install vnstat

after you install vnstat you must initiate the db for store your statistic interface


mari kita buatkan database interfacenya yoooo

#vnstat -u -i eth0
#vnstat -u -i eth1

change eth0 or eth1 with your interface, kalau kamu ngak tahu cukup ketik ifconfig nnti terlihat id interface kamu

sampai sini kamu cukup letakkan cron job di /etc/cron.d atau di crontab -e


#crontab -e
*/5 * * * * /usr/bin/vnstat -u > /dev/null 2>&1

#cron.d

google:/etc/cron.d# cat /etc/cron.d/vnstat
#
# cron-jobs for munin-node
#

MAILTO=root

# This is Vnstat cronjobs
*/5 * * * * root /usr/bin/vnstat -u > /dev/null 2>&1

to check you monthly bandwidth


#vnstat --months

to check you hours bandwidth


#vnstat --hours

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s