KBM takes up 572% CPU

Hello, what would this mean? thanks !

Do you have a lot of macros stuck running when this happens?

1 Like

thank you for looking at my question.
No macros running (it was my first reflex), apart from the palette floating on my screen.

This may not be helpful, except that it might be. :slight_smile:

This is not normal. It’s highly unlikely it’s a bug in KM.

So that leaves the question of what is going on. I know you said there aren’t any macros running, but my guess is that there actually are one or more macros running.

There’s a “Cancel All Macros” action. Try running that and see what happens. Also, look for time-based triggers.

1 Like

I created a cancel all macros Macro.

you are a genius. thanks very much

1 Like

LOL. I think the bar for "genius" is slightly higher than that, but you're more than welcome. Glad I could help.

2 Likes

Generally, the only time you get high CPU usage out of Keyboard Maestro Engine is when it is searching the screen for an image (which is a highly computationally intensive task).

It will do this if you are executing a macro that requires this functionality (especially bad can be Pause Until since this will continuously check for the image). Check the Keyboard Maestro status Cancel submenu to see what macros are currently running, as well as the recently executed macros (select the All Macros group and sort the macros by macro execution).

If will also do this if there is an action editor displayed in the Keyboard Maestro editor which is live evaluating an expression involving searching the screen. Eg, an If Then Else action with a Screen Condition action. Since the displayed “(currently true)” or “(currently false)” condition is updated every second, even if the macro is not executing, if the condition is displayed in the Keyboard Maestro editor, it is still testing the screen.

Cancel the appropriate macros, add timeouts if necessary so they dont recur, and don’t leave the Keyboard Maestro editor displaying such an action (quit it, or undisclose the actions, or deselect the macro).

2 Likes

You are spot on: I had used a macro a few hours before, which was searching for an image.
thank you very much.
I created the macro because I have to fill in the same form (different URL every day) in which

  • I have to click on radio buttons
  • in Chrome
  • I have 3 radio buttons to click
  • the form is only one screen, but I have to page down once to complete it.
    I would like to automatize the procedure. I can’t send an image for privacy reasons.
    Would you have any KBM action suggestions?
    thanks very much

I've often wondered how to tell what macros are active, or what's run recently. If I had thought about it, I could have figured out the second part, but the first part is awesome. I never even noticed that menu item before.

1 Like

About once a week, KM takes off and runs very high CPU (Activity Monitor @ >200%). I kill KM and just restart it and it clears.

I have lots of KM macros I am running - Is there anyway to see which one might be causing it? For instance, if I force-kill the program, will that create a log file that might have useful info? I have KM so integrated right now, most of the time I do not even know I am using it.

You can use the action "Cancel all Macros" to terminate all active macros.

Then you can run this macro:

It will tell you the macros that have recently run, and the date/time when they ran. Look for anything suspicious. If it happens again, repeat the process. It won't take too long to find the culprit.

Hey Ed,

You’ve tried the Cancel All Macros action instead of killing Keyboard Maestro?

How exactly are you killing Keyboard Maestro?

You know the Keyboard Maestro Editor has a Quit Engine command? Force-Quitting should never be necessary (except in extraordinary circumstances).

You’ve looked in the Keyboard Maestro Status Menu > Cancel submenu to see what’s running?

Have you actually looked at Keyboard Maestro’s logs? (See Open Logs Folder in the Help menu.

You’ve gone to the All Macros group and sorted by Date Used?

-Chris

Chris,

  • activity monitor to kill
  • ok
  • no
  • no
  • no

Bottom line is no on all counts…

It was something that I just had not spent a lot of time on. But saw the
message board here and thought I would make the comment.

Let me run the list you provided to see if I can gain insight to what is
going on. If I figure it out, I’ll poste back. As always, appreciate the
guidance.

Ed

Hey Ed,

I've used iStat Menus for years to keep on top of what's happening with my System.

I can tell at a glance whether something unexpected is going on with CPU, memory, network input/output, disk activity, and battery.

I also use Keyboard Maestro's Iconaholic Loud icon to rapidly get my attention if KM is taking an unexpected amount of time to run a macro.

-Chris

Oh that is interesting. I use something called textbar.

I can set up various terminal commands and other functions.
30G is disk space, 0268 is a ping against Baidu.com, 0109 is a ping against
Google.com. I monitor those because i am in China and have to figure out if
my VPN is connecting to the US properly. It does a bunch of other things.
But I like the iStat view, looks like it beats staring at the Activity
Monitor Icon.

Many thanks.

  • Ed.

Read my post above:

Keyboard Maestro uses essentially no CPU, except when running a macro.

Hey Ed,

Textbar is slick for what it does.

iStat Menus is just on a whole other level for system monitoring.

All of the menus open to reveal significantly more information. Here's the CPU menu:

I just noticed that it's part of the MacUpdate.com Summer Bundle too.

I think the retail price is $18.00 U.S. for iStat Menus.

The MacUpdate bundle is $49.95 U.S. for 10 apps, but I already have too many of them for it to be a good investment.

-Chris

I’m trying out iStat now. Yeah, textbar does the one thing I really
needed… monitoring of my connections to the U.S. The Great Firewall is a
tough go so the ability to ping constantly (like every 2 or 3 seconds) to
monitor connections is great. iStat looks like a keeper so thanks for
that.

Ed

OK, 1 day with iStat and I am hooked. It’s also nice to see that the iStat app itself is not materially loading down my Macbook Pro. Textbar will continue to live though as I can monitor via ping multiple servers. Thanks again for the input.

Well, I ran the “last macros run” macro and it provided the log. I figured out that one of the applications that uses a lot of screen image recognition calls was broken and driving the CPU high and leaving it there. Is there a way to set a timeout specifically on the image recognition function?

With that said, the macro is called ZoomFocusToggle, and I’ll place it into the Macros section.

Thanks to all for the input.