Linode.com Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MemberlistMemberlist    UsergroupsUsergroups  RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

bandwidth monitoring (4 algorithms) alerting and graphing

 
Post new topic   Reply to topic    Linode.com Forum Forum Index -> Linux Tips, Tricks, Tutorials
View previous topic :: View next topic  
Author Message
Darxus
Senior Newbie


Joined: 24 Jan 2007
Posts: 6
Location: Boston Massachusetts

PostPosted: Wed Jan 24, 2007 10:46 pm    Post subject: bandwidth monitoring (4 algorithms) alerting and graphing Reply with quote

http://www.chaosreigns.com/code/linodebw/

This script monitors your bandwidth usage 4 ways:

  • local: total monthly bandwidth usage estimate based on data from /proc/net/dev over the last three hours
  • month: total monthly bandwidth usage estimate based on linode xml over the current month
  • period: total monthly bandwidth usage estimate based on linode xml over the last three hours
  • used: actual total bandwidth used this month, from linode xml
If any of these goes over a threshold (percentage of your quota) specified by you, it emails you. All calculated rates are logged as gigabytes per month.

The url lists three files:
linodebw.pl - perl script, you need to edit three variables at the top.
linodebw.png - example output from my linode
linodebw.gnuplot - config file to graph the data with gnuplot, you'll need to edit the output and log paths.

I would appreciate feedback.

Original Linode XML announcement: http://www.linode.com/forums/viewtopic.php?t=776
Update: http://www.linode.com/forums/viewtopic.php?t=1558

Google searching turned up a previously created script by the same name, but since it appears to have vanished I re-used the name.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vindimy
Senior Newbie


Joined: 04 Dec 2008
Posts: 7
Location: USA

PostPosted: Mon Sep 07, 2009 3:27 pm    Post subject: Reply with quote

Alternatively, look up vnstat. It binds to a specified eth interface and monitors all I/O traffic. Statistics can be displayed with a PHP script that someone wrote. See, for example, http://thedimi.net/a/vnstat
Back to top
View user's profile Send private message Visit poster's website
shah
Senior Newbie


Joined: 26 Sep 2009
Posts: 14

PostPosted: Sun Feb 14, 2010 9:51 am    Post subject: Reply with quote

I second vnstat!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Linode.com Forum Forum Index -> Linux Tips, Tricks, Tutorials All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Forum Archive
RSS 2.0 | Additional RSS options
Powered by phpBB © 2001, 2005 phpBB Group

Home | Members | Contact Us | Terms of Service | ™ © 2003-2008 Linode, LLC. All rights reserved.