6

Activity Monitor can indicate processes that are Not responding:

Activity Monitor screenshot

Is there a way to find these processes using command line? Such as with ps, ...

2
  • 1
    Have you done some prior research (e.g. a websearch)? If so, what methods did you find? Jul 28, 2021 at 12:12
  • 1
    Helpful insight, here
    – JRFerguson
    Jul 28, 2021 at 12:44

1 Answer 1

5

As far as I know, no such Terminal utility is included with macOS.

The standard tools such as ps interact with BSD-style processes on the POSIX layer. ps can tell you the state of the process such as the process being "dead", which means a process whose parent is not aware that it has completed running, or the process state being "uninterruptible waiting", which means a process that has asked the kernel to do something which it is waiting for.

Tools such as ps are not aware of whether or not processes are "responding" in the context that you have here. The "Not responding" label shown in Activity Monitor means that the application (not process, but application) is no longer processing events in its main GUI event loop (i.e. a Cocoa run loop).

I don't know of any third party utility that allows you to list the non-responding processes from the command line, so I decided to make one. You can download it from here:

https://github.com/jksoegaard/NonResponding

You can download the ready to use binary, or use Xcode to compile it on your own Mac.

Technical note: The program uses a "deprecated" function in order to obtain the information, we're looking for. That the function is deprecated does not mean that it doesn't work, or that it is as such problematic to use it right now. It means that the function will probably be removed from a future version of macOS. The function was deprecated in macOS 10.9, but so far no release version of macOS has a replacement for the function. The upcoming macOS Monterey (10.12) includes a new framework named MetricKit that has an alternative function for querying information about app responsiveness. When Monterey is released it could be possible to use this function instead (depending on what is included in the actual final release of Monterey).

18
  • Related: discussions.apple.com/thread/7166263
    – nohillside
    Jul 28, 2021 at 14:49
  • It's deprecated, but there's no alternative in macOS 10.11, which is what I was running on the system when I made the program. There's an alternative in macOS 10.12 (Monterey), but it is currently in beta and subject to change.
    – jksoegaard
    Jul 29, 2021 at 18:53
  • jksoegaard, Thanks for the comment/Technical note: +1 Jul 30, 2021 at 4:47
  • macOS 10.12 was Sierra (2016).  Monterey is macOS 12 (2021).
    – gidds
    Jul 31, 2021 at 15:36
  • I hope everyone knew what I meant… no alternative from macOS 10.9 up to macOS 11, and a possibly alternative coming in macOS 12.
    – jksoegaard
    Jul 31, 2021 at 17:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .