←back to thread

1183 points robenkleene | 2 comments | | HN request time: 0.417s | source
Show context
joncp ◴[] No.24839189[source]
That totally breaks my use case for Little Snitch: working tethered. When I tether my laptop it thinks it has free reign with the bandwidth and all of the little background processes can kill my data in a few minutes. With a firewall, I can grant access to only the processes that I need to get my work done.

Now, I guess I have to run some external firewall between my laptop and my phone. ... or better yet, abandon Apple.

replies(6): >>24839618 #>>24840511 #>>24842589 #>>24842970 #>>24844004 #>>24865182 #
chrisshroba ◴[] No.24839618[source]
For what it's worth, my hacky solution to this is this script which kills all the background processes that use significant bandwidth. If you're interested in how I came up with the list of processes, I can share the BitBar [1] script I wrote for monitoring per-process network usage (I wrote a small wrapper around nettop that logs to a db, which is read periodically by my BitBar script to show me the per-process usage:

    if [ $(whoami) != root ]
    then
      echo "Please run as root, not $(whoami)"
      exit
    fi

    while true
    do
      killall -9 planb 2>/dev/null && echo "$(date) - Killed planb"
      killall -9 murdockd 2>/dev/null && echo "$(date) - Killed murdockd"
      killall -9 uplink-soecks 2>/dev/null && echo "$(date) - Killed uplink"
      killall -9 nsscacheclient 2>/dev/null && echo "$(date) - Killed nsscacheclient"
      killall -9 ksfetch 2>/dev/null && echo "$(date) - Killed ksfetch"
      killall -9 nsurlsessiond 2>/dev/null && echo "$(date) - Killed nsurlsessiond"
      killall -9 softwareupdated 2>/dev/null && echo "$(date) - Killed softwareupdated"
    done

[1]: https://github.com/matryer/bitbar
replies(2): >>24839827 #>>24841381 #
1. droopyEyelids ◴[] No.24839827[source]
please share the script for monitoring per-process network usage! I'd love it.
replies(1): >>24841065 #
2. chrisshroba ◴[] No.24841065[source]
I just pasted the relevant files in here. At some point I'll try to make this a bit more professional and easy to use, but for now it works!

https://gist.github.com/chrisshroba/e31fd89b6a560733d3f915e8...

(ps if having an easily installable version of this would be helpful to anyone reading this, please comment or upvote this and maybe I'll prioritize it :) )