How can I get ethernet link speed on macOS Monterey?

Network Utility has gone.

ifconfig reports only maximum possible link speed.

How can I get actual link speed after negotiation of ethernet adapter (not WiFi)?


Mac mini, macOS 12.2

Posted on Apr 5, 2022 1:22 AM

Reply
4 replies

Apr 5, 2022 4:46 AM in response to Shun_Takasu

Network Utility reported Link Speed over Ethernet as the fixed rating of the physical Ethernet adapter (e.g 1Gbit/s). It would report the Wi-Fi Link Speed as a variable based on the current Wi-Fi signal strength, interference, and other factors.


What you may be interested in is the speed with which your Ethernet connect demonstrates between your location and somewhere else, as there is no tool present in macOS that reports your instantaneous Ethernet bandwidth in your own internal network.


In macOS Monterey, there is a new utility named networkQuality that you run from the Terminal:

networkQuality -v


and prior to Monterey v12.3, where Apple removed Python, you can invoke speed test results in the Terminal to the dynamically chosen remote site hosting the speed test:


curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python -


That will report your download and upload speeds in Megabits per second (Mbits/s) and can be converted to MB/s in the Terminal:


bc <<<"116.96 / 8"



Apr 6, 2022 6:07 AM in response to Shun_Takasu

If it is even possible, and unless you want to write custom networking software with elevated privileges, I do not believe that the information that you seek for link-level negotiation speed between a source and destination can be obtained with the existing tools that Apple provides with macOS.


You are asking for a mathematical integration of values over time between two points where you do not control the continuously variable factors in the middle.

Apr 6, 2022 6:55 AM in response to Shun_Takasu

Shun,


Terminology... "speed" doesn't clearly define what you want to know. The actual link bit rate will always be the negotiated rate, even if the payload is lower. If the connected equipment labors with the transmitted data, the link may not be fully loaded with data. There will be periods of no data transferred (kinda like no-ops), but there will still be a line-rate signal to maintain link synchronization.


If the link equipment has negotiated down to a lower rate, you might have to infer what that is by measuring the maximum amount of data transferred over a given period. Transferred data will always be less; it can't be more than the negotiated rate.


Since Ethernet link rates each have their own line code, such as 8B/10B for10G Ethernet, that ["8/10"] factor will have to be considered in your determination. Testing links with a pseudo-random (PRBS) data pattern, the ratio correlates well to the maximum data transfer rate to the line rate.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How can I get ethernet link speed on macOS Monterey?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.