See also command lines it is tedious to remember for general unix/macOS/BSD commands.
Wizard Zines sez:
Finding bandwidth hogs
This is closely related to firewalls, which also often monitor the traffic instead of purely directing it,
On macOS LittleSnitch, is once again the winner, by collecting statistics on various programs and how much internet they suck down.
On Linux, it’s less shiny but still feasible.
Barebones, use socket statistics, in watch mode:
watch -n1 sudo ss -ntp # Do not try to resolve service names. TCP. View processes
See also pyroute which is some kind of
ss clone in, presumably, python
Things like ntop will give you an overview of which ports and servers and suchlike are consuming your bandwidth, i.e. at the application level. The presentation can be friendly, even. I couldn’t work out how to make it tell me which processes were making the connections but maybe the problem is me.
nethogs, will tell you which processes are using data right now, but it won’t give you lovely graphs of data-versus-time etc. There are various GUIs, e.g. hogwatch (for web tech), gnethogs, nethogs-qt.
e.g. Not consuming all your bandwidth when you do that tether thing with your phone.
This is closely related to application firewalls, which manage traffic per process, but that is a lot more general, and also doesn’t usually include neat things like throttling.
The luxurious solution is to use the intuitive GUI to create rules in Little Snitch, which is nominally privacy software, but is in fact more generally useful. Worth the money. Go into Little Snitch and create a “profile” called “low bandwidth” which prevents e.g. your Droppantsbox or Ogle Drive or P3wncloud or other file syncing software from accessing the internet when you are in a “low bandwidth” situation. Remembering to switch, now…
Also possibly useful for might be lulu, a macOS firewall.
Some different application firewall I s’pose? there is the elderly and quirky trickle which does application throttling but in a hairy way via dynamic library injection.
tc is more mainstream but works at the interface level and is not that obvious, although there are basic guis.
macOS with bad internet
You don’t live in San Francisco? Do you live somewhere with horribly corrupt development politics, like Australia, and hence awful internet. Don’t worry, these and other deficiencies of the differently bandwidthed are no longer debilitating in modern society.
Switch your wifi off and on again.
Switch your wifi off an on again, detailed version.
Turn off wifi on your macbook from the Mac macOS terminal command line:
Turn on wifi on your macbook from the Mac macOS terminal command line:
More of these under macOS hacks.
I’m just kidding, you’re still fucked; The hanging network connections of shitty Indonesian broadband will still bring your OS down eventually. Apply for a Californian visa, even a temporary one, just until the singularity arrives and you ascend into digital heaven drinking kombucha with George Lucas in the back of his convertible, and livestream the whole thing on youtube without pausing to buffer.
Apparently the bandwidth is also good in South Korea, but you’ll probably need a different ride.
If you are a developer, try to develop using traffic throttling to test your users’ experiences.
I don’t know but this is just one of the many nasty side-effects of unreliable network connections; If your nasty ISP drops enough packets there are a whole bunch of ways that your computer will DOS itself into the ground, because it is a state alien to Apple engineers.
Here are some potential workarounds:
Look for misbehaving processes and corrupt wassamajiggies.
Or tell Finder to stop obsessing about fancy network drives that won’t work anyway:
In this file comment out /net: