Ethr 是一款用于 TCP、UDP 和 ICMP 的全面网络测量工具。
Ethr takes inspiration from existing open source network performance tools and builds upon those ideas. For Bandwidth measurement, it is similar to iPerf3, for TCP & UDP traffic. iPerf3 has many more options for doing such as throttled testing, richer feature set, while Ethr has support for multiple threads, that allows it to scale to 1024 or even higher number of connections, multiple clients communication to a single server etc. For latency measurements, it is similar to latte on Windows or sockperf on Linux. Ethr provides more test measurements as compared to other tools, e.g. it provides measurements for bandwidth, connections/s, packets/s, latency, and TCP connection setup latency, all in a single tool. In the future, there are plans to add more features (hoping for others to contribute) as well as more protocol support to make it a comprehensive tool for network performance measurements. Ethr is natively cross platform, thanks to golang, as compared to compiling via an abstraction layer like cygwin that may limit functionality. It hopes to unify performance measurement by combining the functionality of tools like iPerf3, ntttcp, psping, sockperf, and latte and offering a single tool across multiple platforms and multiple protocols. # Installation ## Download https://github.com/Microsoft/ethr/releases/latest **Linux** ``` wget https://github.com/microsoft/ethr/releases/latest/download/ethr_linux.zip unzip ethr_linux.zip ``` **Windows Powershell** ``` wget https://github.com/microsoft/ethr/releases/latest/download/ethr_windows.zip -OutFile ethr_windows.zip Expand-Archive .\ethr_windows.zip -DestinationPath . ``` **OSX** ``` wget https://github.com/microsoft/ethr/releases/latest/download/ethr_osx.zip unzip ethr_osx.zip ``` ## Building from Source Note: go version 1.11 or higher is required building it from the source. We use go-module to manage Ethr dependencies. for more information please check [how to use go-modules!](https://github.com/golang/go/wiki/Modules#how-to-use-modules) ``` git clone https://github.com/Microsoft/ethr.git cd ethr go build ``` If ethr is cloned inside of the `$GOPATH/src` tree, please make sure you invoke the `go` command with `GO111MODULE=on`! ## Docker Build image using command: ``` docker build -t microsoft/ethr . ``` Make binary: **Linux** ``` docker run -e GOOS=linux -v $(pwd):/out microsoft/ethr make build-docker ``` **Windows** ``` docker run -e BINARY_NAME=ethr.exe -e GOOS=windows -v $(pwd):/out microsoft/ethr make build-docker ``` **OS X** ``` docker run -e BINARY_NAME=ethr -e GOOS=darwin -v $(pwd):/out microsoft/ethr make build-docker ``` ## Using go get ``` go get github.com/microsoft/ethr ``` ## Using ArchLinux AUR Assuming you are using [`yay`](https://aur.archlinux.org/packages/yay/) (https://github.com/Jguer/yay): ``` yay -S ethr ``` # Publishing Nuget package Follow the topic Building from Source to build ethr.exe Modify ethr.nuspec to add new release version ``` vim ethr.nuspec ``` Create a nuget package(like Ethr.0.2.1.nupkg) ``` nuget.exe pack ethr.nuspec ``` Upload the package to nuget.org. # Usage ## Simple Usage Help: ``` ethr -h ``` Server: ``` ethr -s ``` Server with Text UI: ``` ethr -s -ui ``` Client: ``` ethr -c ``` Examples: ``` … ``` ## Known Issues & Requirements ### Windows For ICMP related tests, Ping, TraceRoute, MyTraceRoute, Windows requires ICMP to be allowed via Firewall. This can be done using PowerShell by following commands. However, use this only if security policy of your setup allows that. ``` // Allow ICMP packets via Firewall for IPv4 New-NetFirewallRule -DisplayName "ICMP_Allow_Any" -Direction Inbound -Protocol ICMPv4 -IcmpType Any -Action Allow -Profile Any -RemotePort Any // Allow ICMP packets via Firewall for IPv6 New-NetFirewallRule -DisplayName "ICMPV6_Allow_Any" -Direction Inbound -Protocol ICMPv6 -IcmpType Any -Action Allow -Profile Any -RemotePort Any ``` In addition, for TCP based TraceRoute and MyTraceRoute, Administrator mode is required, otherwise Ethr won't be able to receive ICMP TTL exceeded messages. ### Linux For ICMP Ping, ICMP/TCP TraceRoute and MyTraceRoute, privileged mode is required via sudo. ## Complete Command Line ### Common Parameters ``` -h Help -no Disable logging to file. Logging to file is enabled by default. -o Name of log file. By default, following file names are used: Server mode: 'ethrs.log' Client mode: 'ethrc.log' -debug Enable debug information in logging output. -4 Use only IP v4 version -6 Use only IP v6 version ``` ### Server Mode Parameters ``` In this mode, Ethr runs as a server, allowing multiple clients to run performance tests against it. -s Run in server mode. -ip Bind to specified local IP address for TCP & UDP tests. This must be a valid IPv4 or IPv6 address. Default: - Any IP -port Use specified port number for TCP & UDP tests. Default: 8888 -ui Show output in text UI. ``` ### Client Mode Parameters ``` … ``` ### External Mode Parameters ``` … ``` # Status Protocol | Bandwidth | Connections/s | Packets/s | Latency | Ping | TraceRoute | MyTraceRoute ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- TCP | Yes | Yes | NA | Yes | Yes | Yes | Yes UDP | Yes | NA | Yes | No | NA | No | No ICMP | No | NA | NA | NA | Yes | Yes | Yes # Platform Support **Windows** Tested: Windows 10, Windows 7 SP1 Untested: Other Windows versions **Linux** Tested: Ubuntu Linux 18.04.1 LTS, OpenSuse Leap 15 Untested: Other Linux versions **OSX** Tested: OSX is tested by contributors **Other** No other platforms are tested at this time # Todo List Todo list work items are shown below. Contributions are most welcome for these work items or any other features and bugfixes. * Test Ethr on other Windows versions, other Linux versions, FreeBSD and other OS * Support for UDP latency, TraceRoute and MyTraceRoute # Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
暂无开放 Issues,或尚未同步最近议题。