Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Jan 24, 2007 11:46 pm 
Offline
Senior Newbie

Joined: Wed Jan 24, 2007 10:28 pm
Posts: 9
Website: http://www.ChaosReigns.com/
Location: Boston Massachusetts
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.


Top
   
 Post subject:
PostPosted: Mon Sep 07, 2009 4:27 pm 
Offline
Senior Newbie

Joined: Thu Dec 04, 2008 7:16 pm
Posts: 7
Website: http://thedimi.net/
Location: USA
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


Top
   
 Post subject:
PostPosted: Sun Feb 14, 2010 10:51 am 
Offline
Senior Newbie

Joined: Sat Sep 26, 2009 4:19 am
Posts: 14
I second vnstat!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group