ngreenstein Posted March 16, 2013 Share Posted March 16, 2013 (edited) I made a workflow to kill processes quickly. You can grab it (and read more about it) on GitHub. Direct download link. Here are some highlights: Autocompletes process names Learns and prioritizes processes you kill frequently Shows icons when possible Shows CPU usage Shows process paths Ignores case Screenshot: Enjoy, and feel free to share any feedback you have. Edited March 16, 2013 by ngreenstein stouty, Millan757, Myo Myint Aung and 4 others 5 2 Link to comment
samvlu Posted March 16, 2013 Share Posted March 16, 2013 Awesome! Just what I was looking for. Works very well. ngreenstein 1 Link to comment
nikipore Posted March 16, 2013 Share Posted March 16, 2013 (edited) Very nice. I'd suggest though to pass the pid to args and kill using kill -9 <pid> This has less potential side effects. Edited March 16, 2013 by nikipore Link to comment
ngreenstein Posted March 16, 2013 Author Share Posted March 16, 2013 @samvlu Thanks, glad you like it! @nikipore Hmm, source for that? I've never had issues with killall. Link to comment
nikipore Posted March 16, 2013 Share Posted March 16, 2013 @ngreenstein: I mean that you might have several processes sharing a name; say you have three bash sessions, and only one of them hangs (CPU ~100%), would you want to kill'em all, or just the bad one? ngreenstein 1 Link to comment
ngreenstein Posted March 16, 2013 Author Share Posted March 16, 2013 Oh, great point. I didn't think of that at all. I'll update it today. Thanks for the feedback! Link to comment
ngreenstein Posted March 16, 2013 Author Share Posted March 16, 2013 Ok, @nikipore, I updated it to use `kill -9` by default. Feel free to re-download. You can still kill all processes with matching names by actioning with command-return. nikipore 1 Link to comment
nikipore Posted March 16, 2013 Share Posted March 16, 2013 Cool for the kill -9 part, much safer now. The command-return part is very nice (the best of both worlds), but is broken for me (it shows up, but no action results). ngreenstein 1 Link to comment
ngreenstein Posted March 16, 2013 Author Share Posted March 16, 2013 Oops, thanks for pointing that out. Forgot quotation marks, so processes with spaces in the name didn't work. Should be fixed now. nikipore 1 Link to comment
nikipore Posted March 16, 2013 Share Posted March 16, 2013 Nope. My test case: Open Terminal.app, press Command-N twice. Then you have two processes named "bash". Kill one of them just pressing Enter (works). Kill the other two pressing Command-Enter (doesn't work). Link to comment
ngreenstein Posted March 16, 2013 Author Share Posted March 16, 2013 Try with anything other than bash and let me know if it works for you. I think the problem is that bash has a hyphen at the beginning of the process name and killall is trying to interpret that as a flag (even though it's in quotes). Any ideas? Thanks for your help with testing this! nikipore 1 Link to comment
nikipore Posted March 16, 2013 Share Posted March 16, 2013 (edited) Now I started two Python interpreters. Their process name is something like this (these are MacPort Python 2.6 interpreteres, just in case you wonder): 8980 ttys001 0:00.02 /opt/local/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python And it doesn't work. I haven't looked into your code, but since youre identifying all processes correctly, why don't you pass all process IDs to the arg and put the row-specific pid in the first position? Then the scripts should pretty much look the same, except that one loops over all pids, and the other only picks the first one. No issues with weird names whatsoever. Edited March 16, 2013 by nikipore Link to comment
ngreenstein Posted March 16, 2013 Author Share Posted March 16, 2013 Ok, just pushed another update. Let me know if it changes anything. It now works perfectly OMM for Python, bash, and every other process I've tried it with. I don't have MacPorts to test with, but at this point I can't repro any issues. Thanks for your help! nikipore 1 Link to comment
nikipore Posted March 16, 2013 Share Posted March 16, 2013 No, it doesn't. The two "-bash" test case still fails. Link to comment
ngreenstein Posted March 16, 2013 Author Share Posted March 16, 2013 Can't repro at all. Works OMM. Sorry. Link to comment
nikipore Posted March 16, 2013 Share Posted March 16, 2013 Debugged it and found the reason: Due to a hotkey conflict, the action wasn't triggered at all. Everything works perfectly now. Thanks! Link to comment
ngreenstein Posted March 16, 2013 Author Share Posted March 16, 2013 Great, glad it's sorted out. Hope you find it useful Link to comment
altryne Posted March 16, 2013 Share Posted March 16, 2013 (edited) awesome one! thanx One thing, how about not requiring the query, and when there's no query, showing the top CPU consuming procceses, and then filtering by typed query? Edited March 16, 2013 by altryne Link to comment
sudopeople Posted September 17, 2014 Share Posted September 17, 2014 I edited the icon to have a white border so that it's visible in the black. I figured I'd put it here for anyone that wants it. Old: New: PNG here: Link to comment
ngreenstein Posted September 17, 2014 Author Share Posted September 17, 2014 Good idea, thank you! Please submit a pull request on GitHub and I'll add this change. I edited the icon to have a white border so that it's visible in the black. I figured I'd put it here for anyone that wants it. Old: New: PNG here: Link to comment
sudopeople Posted September 22, 2014 Share Posted September 22, 2014 Good idea, thank you! Please submit a pull request on GitHub and I'll add this change. Done. Thanks for all your work! Link to comment
Smith007 Posted March 4, 2015 Share Posted March 4, 2015 Can we please have an option to relaunch an app, not just kill it? For example if we hold the Shift key with "kill" the workflow can forcequit and relaunch the app, that would be very useful! RuslanI 1 Link to comment
RuslanI Posted March 4, 2015 Share Posted March 4, 2015 Can we please have an option to relaunch an app, not just kill it? For example if we hold the Shift key with "kill" the workflow can forcequit and relaunch the app, that would be very useful! Yes, this is quite good! Or have a special keyword for killing and relaunching. I'm OK with any option as long as there is such functionality. Link to comment
ngreenstein Posted March 5, 2015 Author Share Posted March 5, 2015 Can we please have an option to relaunch an app, not just kill it? For example if we hold the Shift key with "kill" the workflow can forcequit and relaunch the app, that would be very useful! Yes, this is quite good! Or have a special keyword for killing and relaunching. I'm OK with any option as long as there is such functionality. That's a great idea! I'm afraid I don't have time to add this at the moment, but, if anyone feels up to it, they're more than welcome to submit a pull request on the GitHub repo. Thanks! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now