microsoft / ethr Goto Github PK
View Code? Open in Web Editor NEWEthr is a Comprehensive Network Measurement Tool for TCP, UDP & ICMP.
License: MIT License
Ethr is a Comprehensive Network Measurement Tool for TCP, UDP & ICMP.
License: MIT License
I propose that this repository should be used continuous integration service.
to check code lint, to be analyzing sorce code(go vet or gofmt) , and test automatically when each pull request will be coming.
e.g. https://docs.travis-ci.com/user/languages/go/
I think travis-ci has a high affinity for github.
What's the behavior supposed to be for the buffer parameter on a bandwidth test?
I've been taking tcpdumps thinking that it would increase the actual packet size but that doesnt seem to be the case. My test looks like
ethr -c ethr-server -t b -i 1 -l 40mb -d 5s
ethr -c ethr-server -t b -i 1 -l 2gb -d 5s
The packet length ramps up from 64 to 22848 and never changes based on what buffer size I give it. I saw an issue that was closed #16. I'm curious as to how one would go about crafting a packet size or what the buffer size is doing. If there is no way to do this, would you guys be open to PRs implementing that functionality? Thanks
Hello.
The latest version built from f0074ae shows errors when launched as server:
could not get network stats
And also statistics section is empty when launched in UI mode.
Tested on Ubuntu 18.04
Any plans to support exporting the metrics to Prometheus ?
Would allow this to be deployed to servers to track network stats over time. Quite useful.
When I read the code, many warnings raises from my IDE. It looks like it is complaining about the golang naming/comment convention.
If you agree, I will fix them and add a Makefile to make it easy to find/fix.
There is some way to a client to send packets to a server instead server to client?
In a simpler way, there a way to a client do upload, instead of download?
Thanks!
How does this compare to the "standard", meaning iperf3?
May i suggest you add a few words about that to the README? This isn't about which is better, it's more about how is this different.
Dockerfile
This needs work to do HTTP requests from multiple threads to see how many requests/s it can push. This would be useful for testing performance of middle boxes like firewalls, proxies etc.
Hi
It is very useful to test bandwidth on different packet sizes. So it will be best to have special option for that.
Also, as idea: auto-test bandwidth with different packet sizes: 64, 128, 256...1500 or even jumbo frames.
Hello!
IP version output to display, when server side is in use. E.g.:
./ethr -4 -s
Accepting IP version: ipv4
Listening on 9999 for TCP bandwidth tests
Listening on 9998 for TCP conn/s tests
Listening on 9996 for TCP latency tests
Listening on 9899 for HTTP bandwidth tests
Listening on 9799 for HTTPS bandwidth tests
Listening on 8888 for control plane
./ethr -6 -s
Accepting IP version: ipv6
Listening on 9999 for TCP bandwidth tests
Listening on 9998 for TCP conn/s tests
Listening on 9996 for TCP latency tests
Listening on 9899 for HTTP bandwidth tests
Listening on 9799 for HTTPS bandwidth tests
Listening on 8888 for control plane
./ethr -4 -6 -s
Accepting IP version: ipv4, ipv6
Listening on 9999 for TCP bandwidth tests
Listening on 9998 for TCP conn/s tests
Listening on 9996 for TCP latency tests
Listening on 9899 for HTTP bandwidth tests
Listening on 9799 for HTTPS bandwidth tests
Listening on 8888 for control plane
./ethr -s
Accepting IP version: ipv4, ipv6
Listening on 9999 for TCP bandwidth tests
Listening on 9998 for TCP conn/s tests
Listening on 9996 for TCP latency tests
Listening on 9899 for HTTP bandwidth tests
Listening on 9799 for HTTPS bandwidth tests
Listening on 8888 for control plane
Can be useful for dropping specified packets from client side. Personally, after some tests I have 0.5 ratio of initial connections due to multiple TCP6 CLOSE_WAIT
connections (12 hours) in ss -tunlp
output.
The code needs to be modularized to have interface for protocols and handlers for running Bandwidth/Latency/CPS/PPS tests for those protocols. Right now the code is not using clean abstractions.
For example, we should have something like:
type ethrProto interface{
func runBandwidthTest(param…)
func runLatencyTest(param…)
}
type ethrProtoTcp struct {
}
func (p *ethrProtoTcp) runBandwidth(param…) {
}
EPP/TCP is a custom tcp protocol, which is connection oriented tcp protocol with a custom decoder/encoder.
https://tools.ietf.org/html/rfc5734
Does Ethr help in this case to calculate the number of requests per second ?
For UDP, only packets/s is supported right now. It would be good to add latency testing support for it.
For case-sensitive file systems, having the name title-cased can have some unexpected effects. For example currently, if Ethr is installed with go install github.com/Microsoft/Ethr
the resulting binary is named Ethr
, so examples refering to executing ethr
don't work. Tab-completing from e
also won't work, of course.
Hello, I want to ask how ethr calculates pps. I am a beginner, I don't know much about this. I hope I can get some advice.
in my ubuntu
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial
go version
go version go1.6.2 linux/amd64
and I want to build Ethr
➜ Ethr git:(master) go build
# github.com/Microsoft/Ethr
./client.go:326: undefined: sort.SliceStable
./server.go:334: undefined: sort.SliceStable
./stats.go:34: undefined: sort.SliceStable
./utils.go:224: undefined: syscall.RawConn
./utils.go:228: ct.SyscallConn undefined (type *net.TCPConn has no field or method SyscallConn)
➜ Ethr git:(master)
As we can see,sort.SliceStable
is not supported by go version 1.6.2, it is supported until go1.8. So, It will be better if you can add some guidance about go version or other which is supported by Ethr
Clients : Android 8 / Android 9 Pie
Server : Ubuntu Server 18.04
Compiled from latest commit : 65627a0
Steps to reproduce:
Start the server
Initialize the first client with ethr -c IP -p udp
Initialize the second client with ethr -c IP -p -r udp
second client will print this output:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x23a5e4]
goroutine 1 [running]:
main.establishSession(0x100000001, 0x3e8000000001, 0x1000003e8, 0x4420010890, 0xf, 0x44200b6070, 0x34f4c0, 0x442005fb10)
/root/go/src/ethr/client.go:74 +0x4a4
main.runClient(0x100000001, 0x3e8000000001, 0x1000003e8, 0x2540be400, 0x0, 0x7fc9bfa873, 0xd)
/root/go/src/ethr/client.go:28 +0xc0
main.main()
/root/go/src/ethr/ethr.go:374 +0x708
Then the server will be waiting forever for the UDP packets.
One more thing, when client sends the UDP packets, it will fill the pipe , in my case client tried to send 1Gbit of data in one try.
why (https://github.com/Microsoft/Ethr/files/2640289/ethr.zip) client not find -r .
Always remind me that there is no such parameter.
MacOS(Mojave)10.14.1 (18B75)
go1.11.2 darwin/amd64 (homebrew)
ITerm2 Build 3.2.6
$ go build
./serverui.go:88:2: undefined: hideCursor
./serverui.go:89:2: undefined: blockWindowResize
./stats.go:33:2: undefined: getNetDevStats
./stats.go:37:2: undefined: getTcpStats
Ethr version v0.1
Network performance degraded after socket reached CPU core limit. User have to restart server process to have normal performance data.
The connections will stuck at CLOSE_WAIT
state after each test ran. This will reduce almost half the bandwidth, which in our case, bandwidth have gone done from 8 GBit/s
to 5 GBit/s
Output of netstat -noa
tcp6 0 0 :::9999 :::* LISTEN 117950/./ethr
tcp6 2861521 0 10.33.3.25:9999 10.33.3.23:53702 CLOSE_WAIT 117950/./ethr
tcp6 2528001 0 10.33.3.25:9999 10.33.3.23:53762 CLOSE_WAIT 117950/./ethr
tcp6 2846801 0 10.33.3.25:9999 10.33.3.23:53644 CLOSE_WAIT 117950/./ethr
ethr -s
watch 'netstat -noa | grep 9999'
ethr -c <ip_address>
, and repeat this multiple times, you should see the result after it reaches CPU core count on the server machine.It would be great, to package ethr so it can be installed via apt-get.
when i use ethr as client to test tcp connection,my server will not close session,then ehtr will only start one Conection but not thousands of connection
For UDP, only packets/s is supported right now. It would be good to add throughput testing support for it.
Any plans to support exporting the metrics to Prometheus ?
Would allow this to be deployed to servers to track network stats over time. Quite useful.
Test platform : Windows 10 1809 (build 17763.195) running Ubuntu 18.04 using WSL
Build type : build using source
Command run : ethr -s -ui
Issue : I get open /proc/net/snmp: no such file or directory
in the errors section of the UI also in the CLI of the server and client when I try any bandwidth testing.
Solutions tried : Tried installing snmp, snmp-mibs-downloader.
Hello!
It'll be useful to have final, extended, summary on server and client sides instead of current brief.
E.g. for ethr -s
:
Ending Bandwidth test from <client_IP>
Min: %min_value
Max: %max_value
Avg: %avg_value
Dur: %duration
E.g. for ethr -c <server_IP>
:
Ethr done.
Min: %min_value
Max: %max_value
Avg: %avg_value
Dur: %duration
Doable?
Thanks!
I am running a UDP bandwidth test on two devices on my network, testing speed to an external server I have set up.
My internet connection is pretty stable at ~300Mb/s and I'm on wireless so the Linux results seem accurate, the Mac OS results are pretty far off though.
This is the command I am running.
ethr -c {external} -t b -p udp -l 8kb
These are the results.
Ubuntu 19.10:
[ ID] Protocol Interval Bits/s
[ 6] UDP 000-001 sec 217.98M
[ 6] UDP 001-002 sec 223.49M
[ 6] UDP 002-003 sec 234.50M
[ 6] UDP 003-004 sec 241.34M
[ 6] UDP 004-005 sec 239.42M
[ 6] UDP 005-006 sec 235.07M
[ 6] UDP 006-007 sec 239.17M
[ 6] UDP 007-008 sec 219.14M
[ 6] UDP 008-009 sec 222.78M
[ 6] UDP 009-010 sec 220.67M
Mac OS 10.14.6:
[ ID] Protocol Interval Bits/s
[ 12] UDP 000-001 sec 5.62G
[ 12] UDP 001-002 sec 5.99G
[ 12] UDP 002-003 sec 6.01G
[ 12] UDP 003-004 sec 6.12G
[ 12] UDP 004-005 sec 6.09G
[ 12] UDP 005-006 sec 6.16G
[ 12] UDP 006-007 sec 6.13G
[ 12] UDP 007-008 sec 6.12G
[ 12] UDP 008-009 sec 6.15G
When I try the client, I find it raises a bad error message when I pass in a bad duration for -d
option, e.g. ./Ethr -c 10.29.96.153 -d 10
.
And the error message is Invalid value "%!s(*string=0xc000097cc0)" specified for parameter "-d".
hi,
is it will support QOS traffic later?
iperf3 support QOS on linux (-Q parameter), in windows there are another logical for QOS (https://docs.microsoft.com/en-us/windows/win32/api/_qos/)
Hi.
I am running a UDP network performance test with ethr.
The client reports sending speed, but the server reports only 0 bits/s. Why is that?
UDP/TCP ports 4200-4300 are open, so the traffic should pass. The same experiment with HTTP works well.
I need to know the speed of receiving,
ethr -s -ports control=4287,tcp=4299,udp=4201,http=4289,https=4288
[RemoteAddress] Proto Bits/s Conn/s Pkt/s Latency
[**.**.***.***] UDP 0
[**.**.***.***] UDP 0
[**.**.***.***] UDP 0
[**.**.***.***] UDP 0
[**.**.***.***] UDP 0
[**.**.***.***] UDP 0
[**.**.***.***] UDP 0
[**.**.***.***] UDP 0
[**.**.***.***] UDP 0
[**.**.***.***] UDP 0
Ending Bandwidth test from **.**.***.***
ethr -c IP -n 1 -p udp -t b -ports control=4287,tcp=4299,udp=4201,http=4289,https=4288 -l 64KB
[ ID] Protocol Interval Bits/s
[ 6] UDP 000-001 sec 1.90G
[ 6] UDP 001-002 sec 1.89G
[ 6] UDP 002-003 sec 1.89G
[ 6] UDP 003-004 sec 1.89G
[ 6] UDP 004-005 sec 1.89G
[ 6] UDP 005-006 sec 1.89G
[ 6] UDP 006-007 sec 1.89G
[ 6] UDP 007-008 sec 1.89G
[ 6] UDP 008-009 sec 1.89G
[ 6] UDP 009-010 sec 1.89G
CentOS release 6.5 (Final)
[root@node172 ethr]# ./ethr -s
Listening on 9999 for TCP bandwidth tests
Listening on 9998 for TCP conn/s tests
Listening on 9996 for TCP latency tests
Listening on 9899 for HTTP bandwidth tests
Listening on 9799 for HTTPS bandwidth tests
Listening on 9896 for HTTP latency tests
Listening on 8888 for control plane
panic: runtime error: slice bounds out of range
goroutine 88 [running]:
github.com/microsoft/ethr/internal/stats.buildNetDevStat(0xc0012c4180, 0x7f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/opt/sumscope/ethr/internal/stats/linux.go:84 +0x3f8
github.com/microsoft/ethr/internal/stats.osStats.GetNetDevStats(0x0, 0x0, 0x0, 0x0, 0x0)
/opt/sumscope/ethr/internal/stats/linux.go:60 +0x302
main.getNetworkStats(0xa7b100, 0x50f7a5cd, 0xa5e5a0, 0x50ed975a, 0x0, 0x0)
/opt/sumscope/ethr/stats.go:19 +0x3f
main.emitStats()
/opt/sumscope/ethr/stats.go:115 +0x133
main.startStatsTimer.func1(0xc000fc6500)
/opt/sumscope/ethr/stats.go:86 +0x3b
created by main.startStatsTimer
/opt/sumscope/ethr/stats.go:82 +0x66
[root@node172 ethr]# ./ethr -c "172.16.73.153"
Connecting to host [172.16.73.153], port 9999
[ 6] local 172.16.75.172 port 48967 connected to 172.16.73.153 port 9999
[ ID] Protocol Interval Bits/s
[ 6] TCP 000-001 sec 701.18M
panic: runtime error: slice bounds out of range
goroutine 1341 [running]:
github.com/microsoft/ethr/internal/stats.buildNetDevStat(0xc000f70280, 0x7f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000045e30, 0x6)
/opt/sumscope/ethr/internal/stats/linux.go:84 +0x3f8
github.com/microsoft/ethr/internal/stats.osStats.GetNetDevStats(0x0, 0x0, 0x0, 0x0, 0x0)
/opt/sumscope/ethr/internal/stats/linux.go:60 +0x302
main.getNetworkStats(0xa7b100, 0x5fb9733c, 0xa5e5a0, 0x5faf3302, 0x0, 0x0)
/opt/sumscope/ethr/stats.go:19 +0x3f
main.emitStats()
/opt/sumscope/ethr/stats.go:115 +0x133
main.startStatsTimer.func1(0xc000f56140)
/opt/sumscope/ethr/stats.go:86 +0x3b
created by main.startStatsTimer
/opt/sumscope/ethr/stats.go:82 +0x66
I'm getting the following error when trying to execute a tcp latency test
root@myserver:~# ethr -6 -c haproxy:9999 -m x -t l -n 25
Error: "Latency" test for "TCP" is not supported.
Please use "ethr -h" for ethr command line arguments.
According to the status, it says that latency tests are supported
The current Mac OS support does not return TCP stats. This enhancement will bring Mac support on par.
go vet founds unreachable code
go vet ./...
# github.com/MicroSoft/Ethr
./server.go:39: unreachable code
https://github.com/Microsoft/Ethr/blob/e106916f2b3b71442b5421c8823b0475421983af/server.go#L39
Now it has just simple cli arguments, how about using a modern cli command such as cobra for the future
If you want to build only pure golang without additional libraries or external dependencies, you can ignore this suggestion.
Shouldnt we use golang log module in order to have better logs, so we can see line number and file of message?
Hello!
README.md
can be updated -- have successfully tested on openSUSE Leap 15
(as a server) + Ubuntu 18.04
and Windows 7 SP 1
( as the clients).
Binaries were downloaded from links of Download
section.
Here left is openSUSE Leap 15
machine and Ubuntu 18.04
on the right hand.
Ubuntu 18.04
+ Windows 7 SP 1
(from virtual machine).
Thanks!
Thanks for making this great tool. I am using this to test some UDP traffic. This is not exactlly an issue, just want to get some confirmations. It is marked in the status that UDP bandwidth is YES(I believe this indicates that UDP bandwidth test is supported). But UDP bandwidth is also mentioned in the TODO list. I want to use this bandwidth test feature for UDP. Can someone please help clarify if this is supported or not?
Protocol | Bandwidth | Connections/s | Packets/s | Latency |
---|---|---|---|---|
TCP | Yes | Yes | No | Yes |
UDP | Yes | NA | Yes | No |
This would be useful for testing performance of middle boxes like firewalls, proxies etc. This should be similar to TCP latency tests that measure request/response latency.
Hello!
Subj.
Despite on -4
and -6
parameters, described in README.md
file in Common Parameters
paragraph, they are unrecognizable by ethr
and are not displayed in help-info on -h
key and when ethr
is given without parameters.
Use-cases I've tested on: ./ethr -4 - s
and ./ethr -4 -c <server_IP_to_connect_to>
. Both of them return ethr
's help-info.
Thanks!
Hello ! I like this project.
I want to contribute this project.
but it is difficult.
I think ethr has big main package.
Further, ethr doesn't have test code.
I think open source project should have test code.
Test code makes it easy to contribute and makes it guessing that main intending of project. then contributer can proper pull request.
And I think It can be split logger, server, client, ui, util, etc package.
after a fresh git clone
doing go build
fails with the following error
./serverui.go:89:2: undefined: hideCursor
./serverui.go:90:2: undefined: blockWindowResize
./stats.go:33:2: undefined: getNetDevStats
./stats.go:37:2: undefined: getTcpStats
Hi,
Wouldn't make more sense to use go-module instead of dep?
Line 165 in fe09eed
Currently, unicode network interface name is not displayed correctly.
Please change the code
xoff++ ==> xoff = xoff + 2
Thanks a lot.
I'm getting the following error when trying to execute a tcp connection test
root@myserver:~# ethr -6 -c haproxy1:9999 -m x -t c -n 25
Error: "Connections/s" test for "TCP" is not supported.
According to the status, it says that connection tests are supported
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.