Giter Club home page Giter Club logo

netuse's Introduction

Network Data Usage

I live on a prepaid internet plan that is usually capped to around 7 GBs per month. Monitoring my bandwidth usage is critical for me.

While on Windows, I used Networx to track my usage, but I couldn't find anything similar for Linux so I created my own little thing - it's far from being perfect, but hey, it works!

Screenshots

Standard statistics:

Screenshot

Week at a glance:

Week at a glance

Hourly Usage Notification:

Week at a glance

Design

The application has two parts - a bash script that runs as a cron job and dumps transferred bytes to log files, and a Python script that processes the files to generate cumulative statistics like Total data downloaded/uploaded, Data Left and Suggested Usage etc.

I've also added a script that can be run as an hourly cron job to alert you (via desktop notifications) of your usage in the last hour and data remaining.

Installation

git clone https://github.com/dufferzafar/netuse ~/Downloads

sudo ln ~/Downloads/netuse/netuse.py /usr/bin/netuse
sudo chmod +x /usr/bin/netuse

cp ~/Downloads/netuse/config.py.example ~/Downloads/netuse/config.py

Add this line to your cron tab (crontab -e):

*/2 * * * * ~/Downloads/netuse/dumper

To also setup hourly usage notifications:

0 * * * * /usr/bin/netuse -n

Future Ideas and TODOs

  • Icons in notifications

  • Use bokeh to chart out the data?

  • Handle Day Night Plan calculations.

    • For monthly plans like: 10 GB Day, 10 GB Night.
  • Make this, the data dumping cron job and a network usage appindicator all a part of a single big application?

netuse's People

Contributors

andlrc avatar dufferzafar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.