Activity Monitor and PS info not matching

When I look at Activity Monitor I can see a process that is chewing up the CPU. If I go into a terminal and run a


ps auxww


the information that I get back does not match what I am seeing in Activity Monitor. Why is there a difference?

Posted on Oct 7, 2020 7:30 AM

Reply
Question marked as ⚠️ Top-ranking reply

Posted on Oct 7, 2020 8:51 AM

Is that the name of the process? I suppose so; does tge project id match what you are seeing in Activity Monitor?

If yhe ids match, what sort of information about the process is the one that ps and AM don’t agree on?

4 replies
Sort By: 

Oct 7, 2020 11:31 AM in response to Luis Sequeira1

ps auxww will give you the command line details of all the processes.


ex:   ps auxww | grep 'myprocess'


You can then add a grep command to get the specific process. The challenge I am running into is that the process in question runs several instances, each with a different command line switch to handle different things. I am trying to see which of these processes is the one using the CPU. For instance I have


myprocess -a

myprocess -b

myprocess -c


It may be the process with the -b switch on it, but In activity monitor, they are all collected together as a single process because they are all the same application. And if you add up the CPU utilization of all the processes with that name, they do not match up with what is showing in activity monitor.

Reply

Oct 7, 2020 11:54 AM in response to ndanger69

Each process has a unique process id. That should be enough to distinguish them, no?



E.g. type ps


  PID TTY           TIME CMD


90527 ttys000    0:00.06 -bash

91434 ttys001    0:00.07 -bash

91761 ttys002    0:00.05 -bash


(I did not add any ps options for brevity)


These numbers on the left are the process id of several bash instances.

If I search for "bash" in Activity Monitor, I can see all those process id as well, so I know which is which.


Reply

Oct 7, 2020 2:09 PM in response to ndanger69

I understand that.

But ps also gives you the pid; and so does Activity Monitor. If you ard not seeing the PID column in Activity Monitor, control-click any header (like process name, cput, etc); a menu will appear and you can check or uncheck a great number of columns.

Reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Activity Monitor and PS info not matching

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.