Hacker News new | past | comments | ask | show | jobs | submit login

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



Won't Launchd simply start them all up again? It'll be simpler to disable the launchDaemons :P

And really, put a sleep in there of at least a second or so or this'll be a huge resource hog.


> Won't Launchd simply start them all up again?

Yeah, that's why it's running an infinite loop heh

> It'll be simpler to disable the launchDaemons

Simpler that just nuking them with kill -9? No way. Better in literally every other way? Absolutely

> or this'll be a huge resource hog

That's a fair suggestion, but I'm seeing 0.0 CPU and MEM consumption, so I'm not too concerned


please share the script for monitoring per-process network usage! I'd love it.


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 :) )




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: