[HN Gopher] macOS Monterey's new network quality tool is surpris...
___________________________________________________________________
macOS Monterey's new network quality tool is surprisingly good
Author : danpetrov
Score : 402 points
Date : 2021-11-15 09:07 UTC (13 hours ago)
(HTM) web link (danpetrov.xyz)
(TXT) w3m dump (danpetrov.xyz)
| m_st wrote:
| Slightly OT, but I'd like to express my astonishment about a
| positive article about a new tool making it to the front page.
| Somehow these days it's always rants about new stuff.
|
| Nice and short read.
| dorianmariefr wrote:
| Aren't you kind of ranting about rants? And am I ranting about
| you ranting about rants? :)
| unilynx wrote:
| Too bad it doesn't have a -4/-6 option. I was just debugging some
| connectivity issues which seem to happen only to ipv6
| DarthNebo wrote:
| If only they fixed the tab groups issue of recurrence despite
| deletion & not keeping new sites in the same tab group either...
| jmull wrote:
| This is a nice little addition.
|
| The UX is nicer than even the best web sites for this (assuming
| you're comfortable with the command line).
| qalmakka wrote:
| Who thought naming a CLI tool with a camel case name was
| acceptable? Why isn't there a law against that?
| knoebber wrote:
| You can do `networkQuality -c` and it will output json. It would
| be fun to make a tiny web front end for it on localhost.
| screenshot wrote:
| Interestingly it uses their own CDN infrastructure by default by
| checking https://mensura.cdn-apple.com/api/v1/gm/config for which
| endpoint to use.
| e_proxus wrote:
| That's also the beauty of Fast.com, that it uses the Netflix
| content servers as benchmark and not some ISP edge hosted
| Speedtest server with special priority.
|
| That gives a more realistic expectation of how Netflix, and in
| this case Apple downloads, will actually perform. And it can't
| be artificially boosted by the ISP.
|
| That being said, I assume both Netflix and Apple have very
| special CDNs with ISP co-located content servers in many cases
| so it is still not a realistic measurement of generic Internet
| performance (but Speedtest is even worse, so -\\_(tsu)_/-)
| jedberg wrote:
| > And it can't be artificially boosted by the ISP.
|
| Well it can... by the ISP unthrottling access to Netflix.
| Which is exactly what Netflix wants them to do! :)
| dzhiurgis wrote:
| Will have to test this at night. Apple TV app is barely
| useable here at 8-9PM here, constantly dropping to 480p or
| worse. Torrents is still better UX in 2021.
| judge2020 wrote:
| Another issue with Fast.com is that sometimes it'll choose an
| OpenConnect box, which is inherently a box at a super close
| ISP datacenter meant for achieving gigabit speed without the
| ISP incurring upstream transit costs.
| dylan604 wrote:
| But who cares? If that's the same box that I connect to
| when I view Netflix content, then that's the performance I
| want to know about. Unless you are saying this OpenConnect
| box (will have to look whatever that is up later) is
| different from what connection is made when I hit Play,
| then that could be an issue.
|
| Then again, Fast.com is primarily a tool for Netflix. It
| let's its users feel like they are getting "useful"
| information, but actually provides much more useful
| information to Netflix than users. If that data generated
| from Fast.com use allows them to provide better service,
| then great. So if from time to time they decide to switch
| to different boxes (premise), then I'm actually okay with
| that too.
| acdha wrote:
| I think the key part is needing that understanding that
| it tells you how fast Netflix will perform, which is
| likely not the same as general internet performance. That
| can be useful to compare with tools like
| https://speed.cloudflare.com/ to see how your ISP's
| peering holds up but it's definitely an important nuance.
| dylan604 wrote:
| Hmmm, I hadn't visited Fast.com in some time. Just
| visited, and it quite clearly states "Your Internet
| Speed" and the title of the page visible in the tab is
| "Internet Speed Test". I can't imagine why people would
| be consfused. /s
|
| I clicked around to see if they defined it in more detail
| about specifically testing Netflix CDN vs general
| internet activity, but I found not such information.
| However, this has always been understood on my part to be
| the case. Maybe because of where I was working when it
| first came on scene? I clearly didn't get that
| information from their website.
| minhazm wrote:
| This is true of most internet speed tests though. Even
| speedtest.net uses their own servers. If you're measuring
| for speed you just need to be sure that the server has
| higher bandwidth available than your ISP.
|
| If you're looking for a generic internet connectivity
| test then you'll need to test a few dozen sites at least,
| with diversity in which CDN's they're using and so on.
| afavour wrote:
| There is a flip side to fast.com, though: it's much more
| likely that it will encounter throttled speeds on mobile
| devices, since many unlimited plans keep the connection to
| Netflix artificially slow.
|
| Not endorsing that for a second but I was using fast.com as
| an absolute measure of internet speed until I realised this.
| But speedtest has the issues you've outlined too, there are
| very few 100% reliable options!
| Phemist wrote:
| The flip side was and I guess still is the exact reason for
| existence of fast.com. ISPs were throttling Netflix, so
| Netflix rolled out its own speed-testing service on its own
| infrastructure to publicly shame ISPs about the throttling.
|
| Without knowing about that background information, I
| suppose use of fast.com is a bit tricky.
| 2c6Nmft wrote:
| I've always found this site to be useful for speedtesting
| https://www.dslreports.com/speedtest?nav=2
| danpetrov wrote:
| That's the thing, ideally you would perform a test for every
| single service that you use directly to their network.
|
| In my previous company where we were doing live broadcast, we
| would have speed testers pre-installed on all the hub and
| edge servers, so we could get realistic numbers for a
| specific use case (for example, requesting. a video stream
| from Germany).
| exikyut wrote:
| Ah, thanks for this! I was going to ask if someone could run
| `strings` on the binary.
|
| I get back: { "version": 1,
| "urls": { "small_https_download_url":
| "https://mensura.cdn-apple.com/api/v1/gm/small",
| "large_https_download_url": "https://mensura.cdn-
| apple.com/api/v1/gm/large", "https_upload_url":
| "https://mensura.cdn-apple.com/api/v1/gm/slurp" },
| "test_endpoint": "ausyd2-edge-bx-006.aaplimg.com" }
|
| I can't pinpoint the semantic value of `test_endpoint`.
| However,
|
| - .../small gives me 0 bytes
|
| - .../large gives me _4 gigabytes_ (!!) which I presume I am
| expected to range-request parts of
|
| - .../slurp accepts input and gives me some stats back.
|
| Upload tests are simple: $ head -c 1048576
| /dev/zero | curl -vvv -F 'test=@-' https://mensura.cdn-
| apple.com/api/v1/gm/slurp [...]
| {"DurationMs":11373,"Bytes":1048729,"BPS":92212}
|
| (Excuse my really bad ADSL2+.)
|
| The above is on Linux but I expect the effort to port that to
| macOS would be low. By all means post any needed modifications
| if you figure that out.
| ripperdoc wrote:
| Nice! A network tool I've always wanted is one that automates the
| investigation you have to do manually if you are experienceing
| "internet issues". I mean, the check list is quite
| straightforward but still a pretty manual process, stuff like: -
| Do I have the expected IP? - Is there large packet loss or
| latency issues hinting at connectivity issues? - Can I ping the
| local gateway? - Can I ping to outside network? - Is my nearest
| DNS responding? - Is another, remote DNS responding? - What does
| Downdetector or similar say about the service I'm trying?
|
| It would be nice with a one click tool that just went through
| this in order and gave a diagnosis.
| perryizgr8 wrote:
| This is what windows network troubleshooter was meant to be.
| But it never seems to work.
| zimbatm wrote:
| Check out https://github.com/ycd/dstp . It's still pretty young
| but it tries to solve that problem. The author needs more
| feedback.
| artificialLimbs wrote:
| #!/bin/zsh ip addr | grep $localNetworkPrefix
| ping $localGateway ping 1.1.1.1 ping $DNS01
| ping $DNS02 open -a Safari
| https://downdetector.com/status/%1
|
| Do `chmod +x ./scriptname.sh` to make executable and run with
| argument (e.g. net.sh facebook) to check a particular service.
|
| Edit: Thanks @Shared404
| X-Istence wrote:
| ip doesn't exist on macOS. That is a Linuxism.
|
| You can use the following: netstat -rn -f
| inet | grep default | head -n 1 | awk '{ print $2 }'
|
| To get the default gateway that is the preferred one on
| macOS, so you don't need to hard code it.
| scutil --dns
|
| Will display the DNS servers/split DNS configuration as well.
| mobilemidget wrote:
| I still type 'ip a s' on osx machines multiple times a
| week, even though I know it doesn't exist for many years.
|
| If on wifi one can also simply option click the wifi icon
| in the menu bar. Maybe some people don't know yet, it was a
| late discovery for me option click shows more information
| there.
|
| For quick internet access check I like 'curl ipconfig.sh'
| mzi wrote:
| I'm on my phone but I think you can do this if you're using
| awk anyway: netstat -rn -f inet | awk
| '/default/ {print $2;exit}'
| Shared404 wrote:
| > Edit: Not sure how to do single spaced newline here.
|
| If you prepend each line with 4 spaces it'll format as code.
| sbr464 wrote:
| I believe only 2 spaces are required.
| dzhiurgis wrote:
| I have xBar plugin (formely BitBar) that pings Cloudflare:
| ping -c 1 -n 1.1 2>/dev/null | awk -F '/' 'END {printf "%.2f
| ms\n", $5}'
|
| Also your router GATEWAY=$(netstat -nr | grep
| '^default' | grep en0 | grep -o
| '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}')
| ping -c 1 -n -q $GATEWAY 2>/dev/null | awk -F '/' 'END {printf
| "%.2f ms\n", $5}'
| blakesterz wrote:
| This is a neat little tool. I had no idea that was hiding in
| there. Anyone have any other little hidden gems on MacOS?
| curun1r wrote:
| I'm not sure if I'd consider it hidden, but there's so much
| that can be done with the oascript utility. The idea that most
| GUI apps can be queried or controlled from the command line is
| super powerful, even if AppleScript is somewhat obtuse.
|
| As an example, I have shell aliases setup to cd into the
| folder(s) open in Finder or reference files selected in Finder.
| danieldk wrote:
| Grapher, it is a nice program to plot functions (2D and 3D):
|
| https://twitter.com/danieldekok/status/1420093244894031874
| danpetrov wrote:
| There is also "networksetup", which allows you to do pretty
| much anything you want with network configuration. Useful if
| you want to e.g. automate VPN network switching or locations.
| cromka wrote:
| > Useful if you want to e.g. automate VPN network switching
| or locations
|
| Can you elaborate on that a bit, please?
| knx wrote:
| If you have a VPN named "MyVPN" you can start it from the
| command line with: networksetup -connectpppoeservice
| "MyVPN".
| cpuguy83 wrote:
| I use this as part of an ssh ProxyCommand. It's
| wonderful.
| exikyut wrote:
| Oh no. Oh no oh no.
|
| You don't mean Apple's implemented the Wi-Fi autoconfig
| functionality Ubuntu failed to deliver in ~2008, do you?
|
| Because if they have... they'll have done it... _correctly._
|
| If the binary and/or supporting libraries have _any_
| references to FieldAgents in them... we 're doomed. That's
| Skynet, right there.
| marcellus23 wrote:
| Can you expand a bit? Some quick Googling didn't reveal
| anything useful to me -- what exactly are you talking
| about?
| mahathu wrote:
| In the file settings ("Get Info") you can set a "stationary
| pad" flag means whenever the file gets edited, a copy is
| created, and the original file doesn't change.
|
| When you're taking a screenshot of a portion of the screen you
| can hold the spacebar to move the rectangle around.
| xyzzy_plugh wrote:
| Is this Copy-on-Write? Is the copy a real file or is this a
| filesystem implementation detail?
| OskarS wrote:
| APFS has CoW semantics, so I would assume it uses the APFS
| filesystem features.
| yjftsjthsd-h wrote:
| I'm pretty sure that feature is older than OS X, let
| alone APFS. It might be implemented using CoW now, but it
| certainly hasn't always been.
| leejoramo wrote:
| The stationary feature has existed since the "Classic"
| days. Probably MacOS 7. So it comes from the HFS era.
|
| It would be more accurate to say when you open a file with
| the Stationary flag set, a new of copy of the document is
| open in the default application. I don't think a file
| system copy is created until you save.
| johndoe0815 wrote:
| Stationary pads were already implemented in the Lisa UI,
| but it took quite some time to show up in classic MacOS -
| https://www.applefritter.com/node/3198
| ksbrooksjr wrote:
| This is much simpler than some of the other utilities
| mentioned, but I love pbcopy and pbpaste. Being able to pipe
| from stdout straight to the clipboard, or vice versa, is really
| useful.
| masklinn wrote:
| "Network Link Conditioner" essentially does the opposite but
| it's a really neat tool: it lets you _degrade_ your connection,
| so you can test how software reacts to degraded network
| conditions, and don't need to install and configure third-party
| proxies and the like.
|
| The biggest drawback is it affects the entire machine, you
| can't enable the conditioner on a per-process basis, so it can
| be a bit rough on the other "normal" usage of the machine.
|
| There's also a version on iOS.
| gcbirzan wrote:
| The other major drawback is that you cannot download it
| without an iCloud account...
| handrous wrote:
| There are _tons_ of excellent pieces of Apple software that
| come with iOS[EDIT macOS, that is] (or are free to download).
|
| Preview's simply amazing and I miss it very much on every other
| platform, _including iOS_ , but probably doesn't count as a
| hidden gem.
|
| One that took me way too long to discover was the Digital Color
| Meter. It's a color picker that comes up instantly (much of
| what's so great about Apple's software is that they give at
| least half a shit about performance, unlike seemingly everyone
| else these days--it _shouldn 't_ be impressive that a color
| picker window comes up instantly from a cold start, but in the
| current software environment, it kinda is) and works for
| everything on your screen.
| blakesterz wrote:
| Oh wow, how have I never noticed the Color Meter!? Thanks for
| pointing to that!
| ilikepi wrote:
| macOS has had a "hidden" WiFi diagnostic tool for years. It
| produces real-time-ish graphs of (IIRC) three different signal
| strength metrics, and it also dumps the data to a file on the
| desktop as it's doing so. By holding down the "Option" key and
| clicking the WiFi icon in the menu bar, the dropdown menu will
| display additional information about the wireless interface,
| and it will also include an entry that reads "Wireless
| Diagnostics..." or similar.
| Zarel wrote:
| I've poked around with Wireless Diagnostics in the past and
| I've never seen any graphs or signal strength metrics. It's
| only ever created a diagnostics data file (which takes many
| minutes and can't be cancelled once it's started) and done
| nothing else.
|
| The diagnostics data file is annoying to read, too...
| wintermutestwin wrote:
| Thank you so much for this. I think this is worthy of a
| separate HN post.
|
| On a related note, these hidden features are really annoying.
| How hard would it be to have a WiFi diags link in the WiFi
| dropdown? Why does Apple think that hiding things makes for a
| better user experience? Is it so that the people in the know
| get to feel like arcane knowledge masters? As it is, I have
| started randomly holding down option and command to see if
| there are hidden options. /rant Does anyone know of a site
| that catalogs these hidden macos options?
| epistasis wrote:
| I think this is a great method for reducing user interface
| complexity, by taking rarely useful things out of the main
| flow.
|
| Option-click is pretty much the only trick used for menus,
| and it's fairly universal across the nearly 80 years of
| Mac. The incidence of people that would be helped by those
| graphs, and the people that option-click is pretty high, so
| this seems like a great combination. It's similar to
| option-letter for inputting characters not on the keyboard
| (alt-code on Windows).
|
| Exposing my parents to one more menu item that will never
| help them, and mostly confuse them and reduce their
| scanning speed, well, that's really not worth it. Every
| option has a cost, and different people bear the weight of
| that cost differently. Some people like having 30 different
| brands of canned tomatoes to choose from at the grocery
| store. Others would prefer 2 or even 1, that are more
| carefully curated. My favorite grocer is like this. It's a
| tiny store, an eighth the size of a super market or less,
| but has a better butcher, better basic groceries, and a
| more extensive selection of rarer ingredients than a
| Safeway. It just doesn't have an entire aisle of pasta
| brands. That's not for everyone, but it is for me. The Mac
| also doesn't have to be for everyone, it for the people it
| fits, it fits really well.
| wintermutestwin wrote:
| The more I think about your points, the more I understand
| the whys. As someone who is moderately technical and new
| to macos, I wish there was a global "power user" setting.
| ketzo wrote:
| > a global "power user" setting.
|
| You can get shockingly far just by holding the "Option"
| key while taking a lot of actions/looking at a lot of
| menus. Always the first thing I try.
| quesera wrote:
| > it's fairly universal across the nearly 80 years of Mac
| 2021 - 1984 == 37
|
| I concur with your other points. :)
| epistasis wrote:
| Oops, I thought I had typed 40... 80 would have been in
| the days of Turing!
| quesera wrote:
| Your typo offered me the rare experience of thinking _"
| Oh my god..."_ followed by _"...wait no that 's wrong"_.
|
| Instead of the increasingly-common _"...wow I 'm old"_.
|
| So, thanks for that! :)
| 0xFFFE wrote:
| You can create your own CA & Certificates from "Keychain
| Access". Quite useful.
| [deleted]
| SquibblesRedux wrote:
| Can anyone speak to "responsiveness?" Is this essentially the
| inverse of latency?
| m0dest wrote:
| This is awesome. I hope the client code will be included in the
| Apple's open source repository [1] after they update it for
| Monterey. It's hard to fully rely on a test without seeing its
| implementation, especially the responsiveness portion.
|
| [1] https://opensource.apple.com/
| judge2020 wrote:
| Just tried running it on my (terribly inconsistent and laggy)
| directv/att satellite internet, and the process crashed with
| NSInvalidArgumentException.
| https://gist.github.com/judge2020/ff0279a51ed59a56aa184867c0...
| (14" MBP base model)
| danpetrov wrote:
| Huh interesting, works fine on my 2018 Intel MBP. Surprising to
| see a bug like this on the newest models.
| X-Istence wrote:
| I doubt its a bug in a particular model. I'm on an M1 Max and
| the tool works without issues.
|
| I am guessing its an bug in the tool itself that the user ran
| into.
| wil421 wrote:
| Works on my M1 Air.
| [deleted]
| js2 wrote:
| The programmer either meant to use NSNull or setValue:forKey or
| simply forgot a nil check.
|
| https://developer.apple.com/documentation/foundation/nsmutab...
|
| Pretty lame mistake to let slip through review and testing and
| a common enough error that Apple calls it out in its
| documentation:
|
| https://developer.apple.com/documentation/foundation/nsmutab...
| ManuelKiessling wrote:
| Simple! Use macOS Monterey's new software quality tool to debug
| this. I've heard it's surprisingly good!
| Doctor_Fegg wrote:
| An intercap in a command line tool?
|
| (Sounds good apart from that!)
| mnadkvlb wrote:
| I hope this improves the network stack in ipads as well. Now that
| apple has same cpu arch on both ipads and macs, i expect better
| network tools for ipads.
|
| I recently tried setting my ipad 5g as a hotspot but couldnt
| share the internet over the ethernet over my dock. If i could do
| that, it would enable the full 1+ gigabit 5g speeds that i get
| natively on ipad to the 2.5G port on the usb-c dock connected
| ethernet.
|
| I also tried tethering through usb-c which gave only 250mbps.
|
| Finally settled using wifi tethering which maxes around 600mbps.
|
| It would be great if there is possibility to share 5g over
| ethernet, that would blow any 5g hotspot out of water with the
| chipset apple have put in the ipads.
| lelandbatey wrote:
| Interestingly, I'm having serious problems just loading the web
| page; visiting the page gets me into a redirect loop, visible in
| cURL like so: $ curl -v --http1.1
| https://danpetrov.xyz/macos/2021/11/14/analysing-network-quality-
| macos.html > GET /macos/2021/11/14/analysing-network-
| quality-macos.html HTTP/1.1 > Host: danpetrov.xyz
| > User-Agent: curl/7.68.0 > Accept: */*
| < HTTP/1.1 301 Moved Permanently < location:
| https://danpetrov.xyz/macos/2021/11/14/analysing-network-quality-
| macos.html
|
| It's returning a 'location' that's the same as the source,
| leading to me never seeing the actual page.
|
| EDIT: It's back now, working and visible.
| josephduffy wrote:
| A version of this is also available on iOS (I think since iOS
| 15.0), although it only shows the RPM:
| https://support.apple.com/en-gb/HT212313
|
| This tool is also mentioned in that page, albeit briefly.
| miles wrote:
| As others have commented, that capital Q is a strange choice for
| sure, and because so many other commands begin with "network",
| autocomplete is needlessly distant. But it's easy enough to set
| "nq" as an alias for networkQuality.
___________________________________________________________________
(page generated 2021-11-15 23:01 UTC)