See also command lines it is tedious to remember for general unix/OSX/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 nice.
Things like ntop will give you a nice overview of which ports and servers and suchlike are consuming your bandwidth, i.e. at the application level. The presentation can be very friendly, even. But it's not directly useful to you if you don't already know whcih processes on your machine are making those network connections.
nethogs on the other hand, will tell you which processes are using data right now, but it won't give you lovely graphs of data-versus-time etc. Even easier, and built-in, is
sudo watch -n1 netstat -tunap
If you run both
nethogs at once you probably have the
right tools to sleuth out any particularly egregious runaway network troubles.
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 luxuiously friendly 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 Owncloud 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, an OSX firewall.
Some different application firewall I s'pose? there is the elderly and quirlky 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 OSX terminal command line:
networksetup -setairportpower en0 off
Turn on wifi on your macbook from the Mac OSX terminal command line:
networksetup -setairportpower en0 on
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:
sudo vi /etc/auto_master
In this file comment out /net:
sudo automount -vc