GithubHelp home page GithubHelp logo

bandwidth-monitor's People

Contributors

egeldenhuys avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

decolnz

bandwidth-monitor's Issues

Graph data and bandwidth usage

Graph total usage as well as bandwidth usage. Graph hourly, daily, weekly.

See Projects/JavaScript/Players Online and Projects/VB.NET/Run escape online players

Just don't implement the same flaws as in those projects!

Consider implementing this in the future network logger system. Can then compare the accuracy of the router web interface.

socket.timeout: timed out

@07b5afacde7b9499fac3046e616b98a7de5ce82d

Traceback (most recent call last):
  File "bandwidth-monitor.py", line 182, in <module>
    r = session.post(url, data=data, allow_redirects=True, timeout=5)
  File "bandwidth-monitor.py", line 49, in main
    statsNew = getStatistics(s)
  File "bandwidth-monitor.py", line 159, in getStatistics

  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 497, in post
    return self.request('POST', url, data=data, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 455, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 578, in send
    history = [resp for resp in gen] if allow_redirects else []
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 178, in resolve_redirects
    allow_redirects=False,
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 558, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 394, in send
    r.content
  File "/usr/lib/python2.7/dist-packages/requests/models.py", line 679, in content
    self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()
  File "/usr/lib/python2.7/dist-packages/requests/models.py", line 616, in generate
    decode_content=True):
  File "/usr/lib/python2.7/dist-packages/urllib3/response.py", line 225, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/usr/lib/python2.7/dist-packages/urllib3/response.py", line 174, in read
    data = self._fp.read(amt)
  File "/usr/lib/python2.7/httplib.py", line 549, in read
    return self._read_chunked(amt)
  File "/usr/lib/python2.7/httplib.py", line 591, in _read_chunked
    line = self.fp.readline(_MAXLINE + 1)
  File "/usr/lib/python2.7/socket.py", line 476, in readline
    data = self._sock.recv(self._rbufsize)
socket.timeout: timed out

Port to Python 3

Currently errors when running on Python 3.5.1

Traceback (most recent call last):
  File "bandwidth-monitor.py", line 198, in <module>
    main()
  File "bandwidth-monitor.py", line 44, in main
    authenticate(username, password, s, hashed)
  File "bandwidth-monitor.py", line 80, in authenticate
    m.update(username)
TypeError: Unicode-objects must be encoded before hashing

Display total usage since start of session

Display the amount of data that has been transfered since the session started.

Total Down (MiB): 82 (348 KiB/s)
Total Up (MiB): 11 (14 KiB/s)
Total session: 12 MiB | 2 MiB

Incorrect session statistics after some time

After a while the following occurs where the session becomes the same as the total.

Total Down (MiB): 2157 (4 KiB/s)
Total Up (MiB)  : 158 (1 KiB/s)
Session (MiB)   : D: 2157 | U: 158

Program stops functioning after successive timeouts

Stops responding after the 4 time out errors:

Total Down (MiB): 157 (5 KiB/s)
Total Up (MiB)  : 712 (1 KiB/s)
Session (MiB)   : D: -2110 | U: 134

[ERROR] Request timed out while fetching statistics!
[ERROR] Request timed out while fetching statistics!
[ERROR] Request timed out while fetching statistics!
[ERROR] Request timed out while fetching statistics!
^CTraceback (most recent call last):
  File "bandwidth-monitor.py", line 240, in <module>
    main()
  File "bandwidth-monitor.py", line 73, in main
    time.sleep(timeDiff)
KeyboardInterrupt

Handle router 32 bit integer overflow

We want to continue counting the session total even over overflow has occurred.

Total Down (MiB): 1069 (70 KiB/s)
Total Up (MiB)  : 969 (3 KiB/s)
Session (MiB)   : D: -2052 | U: 160

Session download should be ~ 5165 MiB if overflow has occurred at 4096 MiB

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.