LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-24-2010, 04:31 PM   #1
Subbass
LQ Newbie
 
Registered: Mar 2007
Posts: 3

Rep: Reputation: 0
Question Which tool to track scheduled download quota


My ISP has implemented a download quota between the "peak" hours of 8am and midnight. It is restricted to 100GB over a rolling 30days.

I would like to track peak and off peak if possible, but only peak is really necessary.

Prior to the limits in certain hours I was using VnStat with a couple of home made scripts to log usage and calculate the rolling 30 days total. I don't really know how to tackle changing it to log only limited hours and am fairly certain my scripting skills just aren't up to it.

Is there another tool that can do what I need, I would very much prefer a console based solution. If it is console and only handles peak and off peak then I can try and script for the 30days again.

Or has anyone managed to script something like this parsing from VnStat already ?

Thanks in advance.
 
Old 07-24-2010, 05:40 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by Subbass View Post
I don't really know how to tackle changing it to log only limited hours
Vnstat uses a cronjob to log traffic stats so you would only change the hours ("*/5 8-0 * * *") to make it run between 8 AM and midnight.
 
Old 07-24-2010, 06:43 PM   #3
Subbass
LQ Newbie
 
Registered: Mar 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by unSpawn View Post
Vnstat uses a cronjob to log traffic stats so you would only change the hours ("*/5 8-0 * * *") to make it run between 8 AM and midnight.
Thanks for your reply.

I am using the latest version of VnStat which I believe uses a daemon rather than cron entry. I'm unsure of how to configure that to only run at the needed times, I did try reading "man vnstatd" without success.
 
Old 07-25-2010, 12:56 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
You could create a cronjob to stop vnstatd at midnight and start it at 8 AM.
 
Old 07-25-2010, 01:13 PM   #5
Subbass
LQ Newbie
 
Registered: Mar 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by unSpawn View Post
You could create a cronjob to stop vnstatd at midnight and start it at 8 AM.
I thought about that but vnstat needs to be run as sudo to --disable and --enable.

I'm not sure if adding a cron to root would work, I assume so ?

Could I achieve that by doing a "sudo su" then adding them "crontab -e" and add it that way ?

I am on Ubuntu 10.04 and haven't fiddled with root crontab before.

Thank you again for your continued suggestions.
 
  


Reply

Tags
quota



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I want to download quota package....??? Khmer Linux - Enterprise 2 12-01-2005 07:08 PM
I want to download quota package Khmer Linux - Software 1 12-01-2005 04:08 PM
Download Quota fritz001 Slackware 0 01-01-2005 01:48 PM
How to create Download Quota on a Server/Gateway? osgaldo Linux - Networking 2 06-27-2003 03:39 AM
Where can I download the quota? minor General 2 06-05-2001 04:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration