Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kschendel

macrumors 65816
Dec 9, 2014
1,288
561
I doubt that you can discover any process resource info in Activity Monitor. Your bet bet is probably something like lsof ("list open files") at the command line. "man lsof" for details.

You can ask Activity Monitor to list "All Processes, Hierarchically" from the View menu to show the process / subprocess structure. I'm not sure if that's what you meant by "connected processes" or not.
 

thewonders

macrumors newbie
Original poster
Sep 22, 2017
16
1
Beautiful Northern California
Thanks. I'm just trying to figure out what processes are attached to kernel_task. I've tried using lsof -p but the PID of kernel_task is 0 which doesn't return anything in the Terminal so I wondered if there was some way in Activity Monitor. Or is there another way of going about this?
 

kschendel

macrumors 65816
Dec 9, 2014
1,288
561
Kernel_task is special, it's the operating system itself. There aren't really any processes associated with it; or alternatively, you could say that everything is associated with it. The cpu/disk accounting for kernel_task likely includes a whole bunch of threads which do system things (e.g. hfs+ journal flush maybe, that sort of thing). On linux it's relatively easy to see these OS worker threads but I don't know of a good way to see them on OS/X. That doesn't mean there isn't any, just that I don't know what they might be. In any case, Activity Monitor won't help you for this; if there is some way to get a better breakdown of kernel_task activity, I expect you'll have to use the command line.
 

ApfelKuchen

macrumors 601
Aug 28, 2012
4,335
3,012
Between the coasts
A Get Info on a process will disclose the Parent Process and the Process Group. However, kernel_task does not respond to a Get Info (at least, not in High Sierra). Anyway, kernel_task does not have a Parent, and the entire OS can be considered its Process Group, so that info wouldn't be all that helpful.
 

thewonders

macrumors newbie
Original poster
Sep 22, 2017
16
1
Beautiful Northern California
I'm fine with using the command line - I just asked about Activity Monitor because I haven't found the commands to do it in the CL. But I'll keep looking - kernel_task is running at 100% and none of the online solutions have helped so far.
 

kschendel

macrumors 65816
Dec 9, 2014
1,288
561
If the usual "cookbook" answers such as overheating, fs repair, etc don't seem to fix it, the best I can come up with is DTrace. You have to enable it in csrutil: boot into recovery by restarting with Cmd-R, open a Terminal, enter: csrutil enable --without dtrace (it will complain about an unsupported configuration), and reboot. There are a few dtrace scripts already on the machine (at least, there were in El Cap, I'd assume they are still there in Sierra or HS) such as iosnoop which you can run with sudo. Google for more info on which dtrace scripts are shipped with the Mac, and if all else fails, you can try writing your own.

I suspect that it's easy to be led astray by the output, unless you have a good idea of what a baseline looks like and obviously you won't have that advantage. Unfortunately I'm not aware of anything significantly better. If you turn up something better, please post!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.