Jump to content
vitor

ProcessControl — Deal with misbehaving processes

Recommended Posts

Call top for an auto-updating list of processes, ordered by CPU usage. Type to filter by process name.


QFd5ibj.png

 

On each process:

  • ⌘↵ quits.
  • ⌥↵ forcibly kills.
  • ⌃↵ limits CPU usage.
  • fn↵ lowers priority (increases niceness).
  • ⇧↵ freezes.


↵ gives more granularity over the options.


smw1ihH.png

 

Download | Source

Edited by vitor

Share this post


Link to post

Update.


Titles in granular control show value. This is mostly a cosmetic change to make it clearer.


To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater.
 

Share this post


Link to post
9 hours ago, x7x7 said:

I don't know why Top Processes doesn't work.

 

Because it hasn’t been updated in four years, and things that started to break were never fixed. I also used that Workflow, until it got so broken I decided to make this alternative.

Share this post


Link to post

Thank you so much for this great workflow. It works superbly.

 

Is it possible that you add a "Restart" option? Ideally, two types of "Restart" would be available:

  • "Quit and Relaunch". For apps that are not really frozen and for some reason just need a restart, I rather quit conventionally to not lose any data.
  • "Force Quit and Relaunch" for apps that are frozen.

Thanks again!

Share this post


Link to post

@kodiak Thank you for the kind words.

 

It isn’t really feasible to do what you ask in this Workflow. It is concerned with processes and you’re asking about apps. They’re different concepts that need to be interacted with differently.

Share this post


Link to post

@vitor, I see. Well, I guess it was a misuse of words and what I really referred to were processes.

 

I checked Activity Monitor and for a given process there, you have an option to Quit (⌥⌘Q) and Force Quit (that small icon, see attachment), which is different than the former option, if I'm not mistaken.

 

Thanks.

 

image.png.0f2be2026c0619e63521cb5daaa81fc9.png

Share this post


Link to post
2 hours ago, kodiak said:

for a given process there, you have an option to Quit (⌥⌘Q)

 

That’s ⌘↵ in the Workflow (Kill process).

 

2 hours ago, kodiak said:

and Force Quit

 

⌥↵ (Force kill process).

Share this post


Link to post

Thanks @vitor.

 

1. Is the Quit command in Activity Monitor equals to conventional quitting (⌘Q) when there's a standard macOS app in focus? (i. e. Chrome).

2. What I was inquiring about was the possibility that you add an option to relaunch the process that was just quitted, or force quitted.

 

Regards

Share this post


Link to post
42 minutes ago, kodiak said:

1. Is the Quit command in Activity Monitor equals to conventional quitting (⌘Q) when there's a standard macOS app in focus? (i. e. Chrome).

 

As far as I’m aware, yes.

 

43 minutes ago, kodiak said:

2. What I was inquiring about was the possibility that you add an option to relaunch the process that was just quitted, or force quitted.

 

I know, and that’s where my previous reply applies. You can’t simply restart a process; not how you can an app. They are not the same thing.


Open Google Chrome, then search for it in with the Workflow. You’ll find a bunch of Google Chrome Helper processes. Those are not the app. Restarting those would not restart Chrome, and they are managed by Chrome, as they should be. It is possible to restart apps with Alfred, but that’s not what this Workflow is about; this Workflow is about processes. To restart apps, you’d need to build something different.

Share this post


Link to post

Update.

 

Increased precision when killing cpulimit.


To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater.

Share this post


Link to post

@Maddog I’ll need you to be way more specific.

  • Which macOS version are you on?
  • Which Alfred version are you on?
  • Which ProcessControl version are you on?
  • What do you mean “kills the workflow”? Does it crash, does nothing show?
  • Open the debugger, set the log output to “All Information”, do your action, and post the output.

Share this post


Link to post

Hey, sorry...

 

OS: 10.11.6

Alfred: 3.6.2 (922)

Process Control: 1.0.6

 

Yeah, the workflow just doesn't show anything, the debug shows:

 

[2018-08-06 10:05:35][ERROR: input.scriptfilter] Code 1: ~/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Scripts/F4B6A515-4330-4787-A8F6-B96452EDC1E5:4:in `split': invalid byte sequence in UTF-8 (ArgumentError)
	from ~/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Scripts/F4B6A515-4330-4787-A8F6-B96452EDC1E5:4:in `<main>'

 

Thanks

 

Share this post


Link to post

I get this: ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin15]

 

I know I'm behind, but I'm just worried about all the changes in the recent OS versions (don't want to switch from the old Karabiner, for example).

Share this post


Link to post

Since this is an issue with the Ruby version on an older OS, I’m tempted to not fix that one. I usually try to support the current macOS release and the one before, and 10.11 is two versions (soon three) behind. Fixing this means introducing a workaround that makes no sense for later versions.

 

That particular issue is difficult for me to debug and fix since I share neither the OS, ruby version, or app with similar peculiarity.

 

I’ll give it some thought.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...