I really like the activity monitor that goes with os x. But sometime it sucks. For example when you want to kill a group of processes. You can mark multiple entries in the process list but you can not end those.
In my case i had trillions of google chrome helper tasks: (maybe because i keep too many tabs open?! naa, has to be caused be some weired 3rd party plugins 😉
The solution is – as it often is – using the command line: “killall”
[mupfel@volkers-imac]$~ > man killall
[mupfel@volkers-imac]$~ > killall -s "Google Chrome Helper"
kill -TERM 37526
kill -TERM 37431
kill -TERM 37133
kill -TERM 56046
kill -TERM 631
[mupfel@volkers-imac]$~ > killall -s "Google Chrome Helper"|wc -l
The latter command simulates (“-s”) what would be done by “killall”. Using “wc -l” we want to count how many process would be killed. 83 is way to high a number for doing it manually.
Lets see the effect of “killall” without simulation: All google chrome tasks are dead now. And the process list shows only the main chrome process.
Of course you have to be carefull which bunch of processes you terminate. Especially because killall support specifying a regex pattern to match the process to kill – as always:
with great power comes great responsibilit 🙂