{"id":13396995,"url":"https://github.com/microsoft/ethr","last_synced_at":"2025-05-14T00:06:13.912Z","repository":{"id":39526046,"uuid":"159038012","full_name":"microsoft/ethr","owner":"microsoft","description":"Ethr is a Comprehensive Network Measurement Tool for TCP, UDP \u0026 ICMP.","archived":false,"fork":false,"pushed_at":"2023-02-25T06:38:11.000Z","size":231,"stargazers_count":5813,"open_issues_count":45,"forks_count":402,"subscribers_count":122,"default_branch":"master","last_synced_at":"2025-05-07T23:46:48.228Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null}},"created_at":"2018-11-25T14:05:30.000Z","updated_at":"2025-05-06T20:09:03.000Z","dependencies_parsed_at":"2023-02-17T03:15:21.912Z","dependency_job_id":"959ba082-f5c8-4171-9d1c-5dd054a18600","html_url":"https://github.com/microsoft/ethr","commit_stats":{"total_commits":108,"total_committers":38,"mean_commits":"2.8421052631578947","dds":0.6388888888888888,"last_synced_commit":"b91785b5e8c112eba0bc928ccd66a47fcc02b6b6"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fethr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fethr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fethr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fethr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microsoft","download_url":"https://codeload.github.com/microsoft/ethr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254043472,"owners_count":22004958,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T18:01:08.965Z","updated_at":"2025-05-14T00:06:13.861Z","avatar_url":"https://github.com/microsoft.png","language":"Go","readme":"# Ethr [![Build Status](https://travis-ci.org/Microsoft/ethr.svg?branch=master)](https://travis-ci.org/Microsoft/ethr)\n\nEthr is a cross platform network performance measurement tool written in golang. The goal of this project is to provide a native tool for comprehensive network performance measurements of bandwidth, connections/s, packets/s, latency, loss \u0026 jitter, across multiple protocols such as TCP, UDP, HTTP, HTTPS, and across multiple platforms such as Windows, Linux and other Unix systems.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Ethr server in action\" src=\"https://user-images.githubusercontent.com/44273634/49815752-506f0000-fd21-11e8-954e-d587e79c5d85.png\"\u003e\n\u003c/p\u003e\n\nEthr takes inspiration from existing open source network performance tools and builds upon those ideas. For Bandwidth measurement, it is similar to iPerf3, for TCP \u0026 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.\n\nEthr 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.\n\nEthr 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.\n\n# Installation\n\n## Download\n\nhttps://github.com/Microsoft/ethr/releases/latest\n\n**Linux**\n```\nwget https://github.com/microsoft/ethr/releases/latest/download/ethr_linux.zip\nunzip ethr_linux.zip\n```\n\n**Windows Powershell**\n```\nwget https://github.com/microsoft/ethr/releases/latest/download/ethr_windows.zip -OutFile ethr_windows.zip\nExpand-Archive .\\ethr_windows.zip -DestinationPath .\n```\n\n**OSX**\n```\nwget https://github.com/microsoft/ethr/releases/latest/download/ethr_osx.zip\nunzip ethr_osx.zip\n```\n\n## Building from Source\n\nNote: go version 1.11 or higher is required building it from the source.\n\nWe 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)\n\n```\ngit clone https://github.com/Microsoft/ethr.git\ncd ethr\ngo build\n```\n\nIf ethr is cloned inside of the `$GOPATH/src` tree, please make sure you invoke the `go` command with `GO111MODULE=on`!\n\n## Docker\n\nBuild image using command: \n```\ndocker build -t microsoft/ethr .\n```\n\nMake binary:\n\n**Linux**\n```\ndocker run -e GOOS=linux -v $(pwd):/out microsoft/ethr make build-docker\n```\n\n**Windows**\n\n```\ndocker run -e BINARY_NAME=ethr.exe -e GOOS=windows -v $(pwd):/out microsoft/ethr make build-docker\n```\n\n**OS X**\n```\ndocker run -e BINARY_NAME=ethr -e GOOS=darwin -v $(pwd):/out microsoft/ethr make build-docker\n```\n\n## Using go get\n\n```\ngo get github.com/microsoft/ethr\n```\n\n## Using ArchLinux AUR\n\nAssuming you are using [`yay`](https://aur.archlinux.org/packages/yay/) (https://github.com/Jguer/yay):\n\n```\nyay -S ethr\n```\n# Publishing Nuget package\nFollow the topic Building from Source to build ethr.exe\n\nModify ethr.nuspec to add new release version\n```\nvim ethr.nuspec\n```\nCreate a nuget package(like Ethr.0.2.1.nupkg)\n```\nnuget.exe pack ethr.nuspec\n```\nUpload the package to nuget.org.\n\n# Usage\n\n## Simple Usage\nHelp:\n```\nethr -h\n```\n\nServer:\n```\nethr -s\n```\n\nServer with Text UI:\n```\nethr -s -ui\n```\n\nClient:\n```\nethr -c \u003cserver ip\u003e\n```\n\nExamples:\n```\n// Start server\nethr -s\n\n// Start client for default (bandwidth) test measurement using 1 thread\nethr -c localhost\n\n// Start bandwidth test using 8 threads\nethr -c localhost -n 8\n\n// Start connections/s test using 64 threads to server 10.1.0.11\nethr -c 10.1.0.11 -t c -n 64\n\n// Run Ethr server on port 9999\n./ethr -s -port 9999\n\n// Measure TCP connection setup latency to ethr server on port 9999\n// Assuming Ethr server is running on server with IP address: 10.1.1.100\n./ethr -c 10.1.1.100 -p tcp -t pi -d 0 -4 -port 9999\n\n// Measure TCP connection setup latency to www.github.com at port 443\n./ethr -x www.github.com:443 -p tcp -t pi -d 0 -4\n\n// Measure TCP connection setup latency to www.github.com at port 443\n// Note: Here port 443 is driven automatically from https\n./ethr -x https://www.github.com -p tcp -t pi -d 0 -4\n\n// Measure ICMP ping latency to www.github.com\nsudo ./ethr -x www.github.com -p icmp -t pi -d 0 -4\n\n// Run measurement similar to mtr on Linux\nsudo ./ethr -x www.github.com -p icmp -t mtr -d 0 -4\n\n// Measure packets/s over UDP by sending small 1-byte packets\n./ethr -c 172.28.192.1 -p udp -t p -d 0\n```\n\n## Known Issues \u0026 Requirements\n### Windows\nFor 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.\n```\n// Allow ICMP packets via Firewall for IPv4\nNew-NetFirewallRule -DisplayName \"ICMP_Allow_Any\" -Direction Inbound -Protocol ICMPv4 -IcmpType Any -Action Allow  -Profile Any -RemotePort Any\n\n// Allow ICMP packets via Firewall for IPv6\nNew-NetFirewallRule -DisplayName \"ICMPV6_Allow_Any\" -Direction Inbound -Protocol ICMPv6 -IcmpType Any -Action Allow  -Profile Any -RemotePort Any\n```\nIn addition, for TCP based TraceRoute and MyTraceRoute, Administrator mode is required, otherwise Ethr won't be able to receive ICMP TTL exceeded messages.\n### Linux\nFor ICMP Ping, ICMP/TCP TraceRoute and MyTraceRoute, privileged mode is required via sudo.\n\n## Complete Command Line\n### Common Parameters\n```\n\t-h \n\t\tHelp\n\t-no \n\t\tDisable logging to file. Logging to file is enabled by default.\n\t-o \u003cfilename\u003e\n\t\tName of log file. By default, following file names are used:\n\t\tServer mode: 'ethrs.log'\n\t\tClient mode: 'ethrc.log'\n\t-debug \n\t\tEnable debug information in logging output.\n\t-4 \n\t\tUse only IP v4 version\n\t-6 \n\t\tUse only IP v6 version\n```\n### Server Mode Parameters\n```\nIn this mode, Ethr runs as a server, allowing multiple clients to run\nperformance tests against it.\n\t-s \n\t\tRun in server mode.\n\t-ip \u003cstring\u003e\n\t\tBind to specified local IP address for TCP \u0026 UDP tests.\n\t\tThis must be a valid IPv4 or IPv6 address.\n\t\tDefault: \u003cempty\u003e - Any IP\n\t-port \u003cnumber\u003e\n\t\tUse specified port number for TCP \u0026 UDP tests.\n\t\tDefault: 8888\n\t-ui \n\t\tShow output in text UI.\n```\n### Client Mode Parameters\n```\nIn this mode, Ethr client can only talk to an Ethr server.\n\t-c \u003cserver\u003e\n\t\tRun in client mode and connect to \u003cserver\u003e.\n\t\tServer is specified using name, FQDN or IP address.\n\t-b \u003crate\u003e\n\t\tTransmit only Bits per second (format: \u003cnum\u003e[K | M | G])\n\t\tOnly valid for Bandwidth tests. Default: 0 - Unlimited\n\t\tExamples: 100 (100bits/s), 1M (1Mbits/s).\n\t-cport \u003cnumber\u003e\n\t\tUse specified local port number in client for TCP \u0026 UDP tests.\n\t\tDefault: 0 - Ephemeral Port\n\t-d \u003cduration\u003e\n\t\tDuration for the test (format: \u003cnum\u003e[ms | s | m | h]\n\t\t0: Run forever\n\t\tDefault: 10s\n\t-g \u003cgap\u003e\n\t\tTime interval between successive measurements (format: \u003cnum\u003e[ms | s | m | h]\n\t\tOnly valid for latency, ping and traceRoute tests.\n\t\t0: No gap\n\t\tDefault: 1s\n\t-i \u003citerations\u003e\n\t\tNumber of round trip iterations for each latency measurement.\n\t\tOnly valid for latency testing.\n\t\tDefault: 1000\n\t-ip \u003cstring\u003e\n\t\tBind to specified local IP address for TCP \u0026 UDP tests.\n\t\tThis must be a valid IPv4 or IPv6 address.\n\t\tDefault: \u003cempty\u003e - Any IP\n\t-l \u003clength\u003e\n\t\tLength of buffer to use (format: \u003cnum\u003e[KB | MB | GB])\n\t\tOnly valid for Bandwidth tests. Max 1GB.\n\t\tDefault: 16KB\n\t-n \u003cnumber\u003e\n\t\tNumber of Parallel Sessions (and Threads).\n\t\t0: Equal to number of CPUs\n\t\tDefault: 1\n\t-p \u003cprotocol\u003e\n\t\tProtocol (\"tcp\", \"udp\", \"http\", \"https\", or \"icmp\")\n\t\tDefault: tcp\n\t-port \u003cnumber\u003e\n\t\tUse specified port number for TCP \u0026 UDP tests.\n\t\tDefault: 8888\n\t-r \n\t\tFor Bandwidth tests, send data from server to client.\n\t-t \u003ctest\u003e\n\t\tTest to run (\"b\", \"c\", \"p\", \"l\", \"cl\" or \"tr\")\n\t\tb: Bandwidth\n\t\tc: Connections/s\n\t\tp: Packets/s\n\t\tl: Latency, Loss \u0026 Jitter\n\t\tpi: Ping Loss \u0026 Latency\n\t\ttr: TraceRoute\n\t\tmtr: MyTraceRoute with Loss \u0026 Latency\n\t\tDefault: b - Bandwidth measurement.\n\t-tos \n\t\tSpecifies 8-bit value to use in IPv4 TOS field or IPv6 Traffic Class field.\n\t-w \u003cnumber\u003e\n\t\tUse specified number of iterations for warmup.\n\t\tDefault: 1\n\t-T \u003cstring\u003e\n\t\tUse the given title in log files for logging results.\n\t\tDefault: \u003cempty\u003e\t\t\n```\n### External Mode Parameters\n```\nIn this mode, Ethr talks to a non-Ethr server. This mode supports only a\nfew types of measurements, such as Ping, Connections/s and TraceRoute.\n\t-x \u003cdestination\u003e\n\t\tRun in external client mode and connect to \u003cdestination\u003e.\n\t\t\u003cdestination\u003e is specified in URL or Host:Port format.\n\t\tFor URL, if port is not specified, it is assumed to be 80 for http and 443 for https.\n\t\tExample: For TCP - www.microsoft.com:443 or 10.1.0.4:22 or https://www.github.com\n\t\t         For ICMP - www.microsoft.com or 10.1.0.4\n\t-cport \u003cnumber\u003e\n\t\tUse specified local port number in client for TCP \u0026 UDP tests.\n\t\tDefault: 0 - Ephemeral Port\n\t-d \u003cduration\u003e\n\t\tDuration for the test (format: \u003cnum\u003e[ms | s | m | h]\n\t\t0: Run forever\n\t\tDefault: 10s\n\t-g \u003cgap\u003e\n\t\tTime interval between successive measurements (format: \u003cnum\u003e[ms | s | m | h]\n\t\tOnly valid for latency, ping and traceRoute tests.\n\t\t0: No gap\n\t\tDefault: 1s\n\t-ip \u003cstring\u003e\n\t\tBind to specified local IP address for TCP \u0026 UDP tests.\n\t\tThis must be a valid IPv4 or IPv6 address.\n\t\tDefault: \u003cempty\u003e - Any IP\n\t-n \u003cnumber\u003e\n\t\tNumber of Parallel Sessions (and Threads).\n\t\t0: Equal to number of CPUs\n\t\tDefault: 1\n\t-p \u003cprotocol\u003e\n\t\tProtocol (\"tcp\", or \"icmp\")\n\t\tDefault: tcp\n\t-t \u003ctest\u003e\n\t\tTest to run (\"c\", \"cl\", or \"tr\")\n\t\tc: Connections/s\n\t\tpi: Ping Loss \u0026 Latency\n\t\ttr: TraceRoute\n\t\tmtr: MyTraceRoute with Loss \u0026 Latency\n\t\tDefault: pi - Ping Loss \u0026 Latency.\n\t-tos \n\t\tSpecifies 8-bit value to use in IPv4 TOS field or IPv6 Traffic Class field.\n\t-w \u003cnumber\u003e\n\t\tUse specified number of iterations for warmup.\n\t\tDefault: 1\n\t-T \u003cstring\u003e\n\t\tUse the given title in log files for logging results.\n\t\tDefault: \u003cempty\u003e\t\t\n```\n\n# Status\n\nProtocol  | Bandwidth | Connections/s | Packets/s | Latency | Ping | TraceRoute | MyTraceRoute\n------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | -------------\nTCP  | Yes | Yes | NA | Yes | Yes | Yes | Yes\nUDP  | Yes | NA | Yes | No | NA | No | No\nICMP | No | NA | NA | NA | Yes | Yes | Yes\n\n# Platform Support\n\n**Windows**\n\nTested: Windows 10, Windows 7 SP1\n\nUntested: Other Windows versions\n\n**Linux**\n\nTested: Ubuntu Linux 18.04.1 LTS, OpenSuse Leap 15\n\nUntested: Other Linux versions\n\n**OSX**\n\nTested: OSX is tested by contributors\n\n**Other**\n\nNo other platforms are tested at this time\n\n# Todo List\n\nTodo list work items are shown below. Contributions are most welcome for these work items or any other features and bugfixes.\n\n* Test Ethr on other Windows versions, other Linux versions, FreeBSD and other OS\n* Support for UDP latency, TraceRoute and MyTraceRoute\n\n# Contributing\n\nThis project welcomes contributions and suggestions.  Most contributions require you to agree to a\nContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\nthe rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide\na CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions\nprovided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n","funding_links":[],"categories":["Go","Misc","Install from Source","\u003ca name=\"infra\"\u003e\u003c/a\u003einfra","Network Tools","HarmonyOS","others","\u003ca id=\"1d9dec1320a5d774dc8e0e7604edfcd3\"\u003e\u003c/a\u003e工具-新添加的","Network Dev\u0026Ops工具与服务"],"sub_categories":["WireGuard Tools","Performance Testing \u0026 Benchmarking","Windows Manager","\u003ca id=\"8f1b9c5c2737493524809684b934d49a\"\u003e\u003c/a\u003e文章\u0026\u0026视频"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fethr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrosoft%2Fethr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fethr/lists"}