Mac – Why is this Python process running on the Mac OS X Server

macmac-osx-serverpython

Any way to see what started this process and why?

$ ps -e

  PID TTY           TIME CMD
  ...
   41 ??         0:00.55 /System/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.

Best Answer

Use ps -efww. The -f option adds a PPID that will tell you the parent process ID ("what started this process"). The -ww options remove all line length restrictions so that you can see the entire command which might tell you "why". I suspect that "Python.app" was truncated and that it's a python script of some sort running.

Another technique would be to use sudo lsof -p 41 to see what files that process has open. This might tell you enough to determine the purpose.

A final technique to consider would be sudo dtruss -p 41 to trace the activity of the program (see what it's doing).

Related Topic