Giter Club home page Giter Club logo

dsum's Introduction

Description

Broadband Meter (Codename Dsum). Records Data Received / Data Sent (in Bytes) periodically to a persistent database.

Initial requirement from my roomies :-) on who is downloading how much ;-)

Code for Fun!

Installation

Download the code.

Unzip the file and change the directory to unzipped folder

Install (my-wifi-name is your SSID - WIFI Name)

sudo make install SSID=my-wifi-name

Run

sudo make run

Stop

sudo make stop

Usage

Total Data Received (in MB)

sqlite3 /Library/Application\ Support/Abhiomkar/Dsum/dsum.db "select SUM(data_received_delta)/(1024.0*1024.0) from dsum"

Total Data Sent (in MB)

sqlite3 /Library/Application\ Support/Abhiomkar/Dsum/dsum.db "select SUM(data_sent_delta)/(1024.0*1024.0) from dsum"

Total Data Received Today (in MB)

sqlite3 /Library/Application\ Support/Abhiomkar/Dsum/dsum.db "select SUM(data_received_delta)/(1024.0*1024.0) from dsum where strftime('%Y-%m-%d', DATETIME(date, 'localtime'))=strftime('%Y-%m-%d', 'now')"

Total Data Received in Last One Hour (in MB)

sqlite3 /Library/Application\ Support/Abhiomkar/Dsum/dsum.db "select SUM(data_received_delta)/(1024.0*1024.0) from dsum where DATETIME(date, 'localtime') >= DATETIME('now', 'localtime', '-1 hours')"

Dependencies

Currently this script works only on Mac OS X (10.4 or Later)

sqlite3

command to install sqlite3:

brew install sqlite3

Uninstall

sudo make uninstall

TODO

  • Front end user-inteface with Line/Bar Charts
  • Show Peek Hours
  • Alerts/Monitoring System
  • Broadband Usage Summary Emails
  • Admin Dashboard

dsum's People

Contributors

abhiomkar avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

sandeepraju

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.