LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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, 05: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, 06:40 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,564
Blog Entries: 54

Rep: Reputation: 2928Reputation: 2928Reputation: 2928Reputation: 2928Reputation: 2928Reputation: 2928Reputation: 2928Reputation: 2928Reputation: 2928Reputation: 2928Reputation: 2928
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, 07: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, 01:56 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,564
Blog Entries: 54

Rep: Reputation: 2928Reputation: 2928Reputation: 2928Reputation: 2928Reputation: 2928Reputation: 2928Reputation: 2928Reputation: 2928Reputation: 2928Reputation: 2928Reputation: 2928
You could create a cronjob to stop vnstatd at midnight and start it at 8 AM.
 
Old 07-25-2010, 02: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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 08:08 PM
I want to download quota package Khmer Linux - Software 1 12-01-2005 05:08 PM
Download Quota fritz001 Slackware 0 01-01-2005 02:48 PM
How to create Download Quota on a Server/Gateway? osgaldo Linux - Networking 2 06-27-2003 04:39 AM
Where can I download the quota? minor General 2 06-05-2001 05:51 AM


All times are GMT -5. The time now is 10:04 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration