It would be nice with a one click tool that just went through this in order and gave a diagnosis.
#!/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
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.If you prepend each line with 4 spaces it'll format as code.
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}'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 ¯\_(ツ)_/¯)
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!
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).
Well it can... by the ISP unthrottling access to Netflix. Which is exactly what Netflix wants them to do! :)
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.
Nice and short read.
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.
Finder's column view is also excellent. I think it's the best way to navigate the filesystem through GUI; the way it displays nested directories is just super nice. It makes me wonder why other OS don't haven't copied this layout in their filesystem explorer.
Grapher.app is also perhaps a hidden gem.
Looks like it’s been updated, I don’t remember the different zoom type options. Maybe I just never discovered them.
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.
When you're taking a screenshot of a portion of the screen you can hold the spacebar to move the rectangle around.
The diagnostics data file is annoying to read, too...
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?
Can you elaborate on that a bit, please?
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.
As an example, I have shell aliases setup to cd into the folder(s) open in Finder or reference files selected in Finder.
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...
This tool is also mentioned in that page, albeit briefly.
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.
The UX is nicer than even the best web sites for this (assuming you're comfortable with the command line).
$ 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.
https://forums.overclockers.co.uk/threads/virgin-media-discu...
I don't know what rpm score that network would get as yet.
https://starwrt.v.taht.net:8443/group/bufferbloat/
(use any login, no password, chrome is best)
There's also the "rpm" mailing list on lists.bufferbloat.net
Are there similar tools for assessing WiFi quality and bandwidth?
(Sounds good apart from that!)