Giter Club home page Giter Club logo

speedometer's Introduction

Speedometer

Speedometer is looking for a maintainer. Please open a ticket on github if you believe you could help maintain this project.

Measure and display the rate of data across a network connection or data being stored in a file.

New Changes

  1. Python 3 is required now, mac os x platform is included.
  2. Use python psutil module, instead of /dev/net for maximal compatibility.
  3. New -d options, support to measure data from running external shell standard output.
  4. Support data source from standard input or pipe line, working only for plain text mode.
    • cat /dev/urandom | python speedometer.py
    • python speedometer.py < /dev/urandom
    • curl --output - https://download.site/file.iso 2>/dev/null | python speedometer.py

Screen Shots

speedometer screen shot w/ transparent bg

speedometer screen shot w/ multiple graphs

speedometer's People

Contributors

admiralnemo avatar empee584 avatar jaalto avatar kenduest avatar normanr avatar rfjakob avatar wardi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

speedometer's Issues

Lacks explanation of speed readings

When I run, e.g. $(speedometer -r wlan0), there are three speed numbers displayed in a row. I cannot for the life of me figure out what each one means. I have watched them to try to discern if one being higher causes one next to it to be higher, but that doesn't seem to be the case. I assume they are time-window averages, but they don't seem to make sense.

The man page says nothing about this.

Also, there are two vertical bars next to the histogram, whose colors seem to correspond to two of the speed readings, yet there is no explanation of what these mean either.

Question about bandwidth measurements

I am wondering where it gets its stats from? I ran speedtests on interfaces and it did not seem to measure correctly. Are there any limitations such as only measuring IPv4 traffic?

I am attempting to use on my Debian based Ubiquiti EdgeRouter X.

urwid 2.4.4 error

Hello everyone,

I get this error after upgrading from urwid 2.3.4 to 2.4.4

Traceback (most recent call last):
File "/usr/bin/speedometer.py", line 4, in
import('pkg_resources').run_script('Speedometer==2.9', 'speedometer.py')
File "/usr/lib64/python3.9/site-packages/pkg_resources/init.py", line 651, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib64/python3.9/site-packages/pkg_resources/init.py", line 1455, in run_script
exec(script_code, namespace, namespace)
File "/usr/lib64/python3.9/site-packages/Speedometer-2.9-py3.9.egg/EGG-INFO/scripts/speedometer.py", line 1421, in
File "/usr/lib64/python3.9/site-packages/Speedometer-2.9-py3.9.egg/EGG-INFO/scripts/speedometer.py", line 992, in console
File "/usr/lib64/python3.9/site-packages/Speedometer-2.9-py3.9.egg/EGG-INFO/scripts/speedometer.py", line 997, in do_display
File "/usr/lib64/python3.9/site-packages/Speedometer-2.9-py3.9.egg/EGG-INFO/scripts/speedometer.py", line 279, in main
File "/usr/lib64/python3.9/site-packages/urwid/event_loop/main_loop.py", line 343, in run
self._run()
File "/usr/lib64/python3.9/site-packages/urwid/event_loop/main_loop.py", line 445, in _run
self.event_loop.run()
File "/usr/lib64/python3.9/site-packages/urwid/event_loop/select_loop.py", line 182, in run
self._loop()
File "/usr/lib64/python3.9/site-packages/urwid/event_loop/select_loop.py", line 224, in _loop
alarm_callback()
File "/usr/lib64/python3.9/site-packages/urwid/event_loop/main_loop.py", line 652, in entering_idle
self.draw_screen()
File "/usr/lib64/python3.9/site-packages/urwid/event_loop/main_loop.py", line 669, in draw_screen
canvas = self._topmost_widget.render(self.screen_size, focus=True)
File "/usr/lib64/python3.9/site-packages/urwid/widget/widget.py", line 112, in cached_render
canv = fn(self, size, focus=focus)
File "/usr/lib64/python3.9/site-packages/urwid/widget/overlay.py", line 784, in render
bottom_c = self.bottom_w.render(real_size)
File "/usr/lib64/python3.9/site-packages/urwid/widget/widget.py", line 112, in cached_render
canv = fn(self, size, focus=focus)
File "/usr/lib64/python3.9/site-packages/urwid/widget/attr_map.py", line 151, in render
canv = self._original_widget.render(size, focus=focus)
File "/usr/lib64/python3.9/site-packages/urwid/widget/widget.py", line 112, in cached_render
canv = fn(self, size, focus=focus)
File "/usr/lib64/python3.9/site-packages/urwid/widget/columns.py", line 899, in render
w.render(w_size, focus=focus and self.focus_position == i),
File "/usr/lib64/python3.9/site-packages/urwid/widget/widget.py", line 112, in cached_render
canv = fn(self, size, focus=focus)
File "/usr/lib64/python3.9/site-packages/urwid/widget/pile.py", line 795, in render
canv = w.render(w_size, focus=focus and item_focus)
File "/usr/lib64/python3.9/site-packages/urwid/widget/widget.py", line 112, in cached_render
canv = fn(self, size, focus=focus)
File "/usr/lib64/python3.9/site-packages/urwid/widget/widget.py", line 780, in render
canv = get_delegate(self).render(size, focus=focus)
File "/usr/lib64/python3.9/site-packages/urwid/widget/widget.py", line 112, in cached_render
canv = fn(self, size, focus=focus)
File "/usr/lib64/python3.9/site-packages/urwid/widget/frame.py", line 604, in render
body = self.body.render((maxcol, maxrow - ftrim - htrim), focus and self.focus_part == "body")
File "/usr/lib64/python3.9/site-packages/urwid/widget/widget.py", line 112, in cached_render
canv = fn(self, size, focus=focus)
File "/usr/lib64/python3.9/site-packages/urwid/widget/columns.py", line 887, in render
widths, _, size_args = self.get_column_sizes(size, focus)
File "/usr/lib64/python3.9/site-packages/urwid/widget/columns.py", line 822, in get_column_sizes
w_sizing = widget.sizing()
AttributeError: 'SpeedGraph' object has no attribute 'sizing'

y-axis is wrong

speedometer -r eth0 -l -n 1000000 -m 9000000

gives me this:

image

which is slightly off.

however

speedometer -r eth0 -l -n 4000000 -m 9000000

is completely wrong:

image

This software eats an absurd amount of cpu cycles!!!

I really like speedometer - unfortunately it definitely is not an acceptable tool for measuring a potentially already heavily stressed system, it eats too many cpu cycles! On a decent Linux laptop with a fast Core i7 speedometer is the most cpu intensive process with around 7-10% CPU usage visible in htop - this is insane! Even Chromium browser does not spend so much with many tabs open!

This is by far the most absurd case of a system measurement tool that stresses the system itself that I have ever seen - a good candidate for an "absurd software award" that should exist.

Feature Request: Historical (horizontal scroll) viewing, log file viewing.

It would be great to be able to horizontally scroll through the recent past; alternatively, it would be great to be able to point speedometer at a "history" file to review prior traffic.

This may be "a bridge too far" on the mission creep scale but man, this would be a super useful front-line troubleshooting tool.

I know there are plenty of cacti and nagios options out there, but speedometer is such a great 'quick & dirty' view of traffic.. I find myself using it often. :-)

osx support

Would be nice, may write myself a PR for this since its really just a matter of giving the code a way to notice its on osx and look at a different source for the data instead of /proc/net/dev like it currently does

Feature request: x-axis labels

Can you please add x-axis labels? Ideally time, but step number or at least vertical lines every 10 steps would be hugely helpful. Thanks!

SyntaxError: invalid syntax

os:CentOS release 5.8 (Final) Linux 2.6.18-308.16.1.el5 x86_64
and urwid-1.1.1,Speedometer 2.8
python.x86_64 2.4.3-46.el5_8.2

when i run "speedometer -r eth0":

speedometer -r eth0

File "/usr/local/bin/speedometer", line 112
n = n * granularity + (granularity if r else 0)
^
SyntaxError: invalid syntax

Support pipe input

This could be used to graph output of "tcpdump -w", possibly an easy way to implement network traffic filters.

Graphs on the Linux console think symbols from ▁ to █ and ⎺ to ⎽ are available.

There doesn't seem to be a way to use the Urwid-based graphs on the Linux console, even though Urwid supports sticking to the console-friendly set (by not setting smooth in the bar graph's satt parameter).

Maybe checking whether TERM is 'linux' (on https://github.com/wardi/speedometer/blob/master/speedometer.py#L1101) would suffice (for Linux, at least).

This happens because the locale is set to UTF-8 and that setting is still present in the console, even though the console can only display the first page of the Unicode space. My "Sextant" fonts in Urwid also fail badly on the console for the same reasons. :-(

support glob files in command line

It would be nice to be able to use globs when calling speedometer.

For example in a directory I have : file1 file2 file3 otherfile1 otherfile2

I'd like to be able to do speedometer -f file* instead of speedometer file1 -f file2 -f file2

Added feature would be to split with -c according to the number of files to form a grid.

Maintainer

I am an experienced Python developer and I would like to help. I'm not sure how much time I could dedicate to maintenance, but this seems like a very mature project. It may be worth a shot, if some original developer would like to help onboarding me.

One thing I'd love to do would be to split the speedometer.py file into more manageable chunks inside a module, but I'm not sure how other maintainers would feel about it.

Documentation

Please add documentation for the Tx/Rx values. Actual,Avg(5m I assume), and max in last 5m?

Thanks,
A

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.