2

I have a big python application with huge source code and I want to count the number of processes that this application has created without seeing the source code( But A file is given where you can add code)

How can I find these values?

Hanu
  • 57
  • 6
  • There is `threading.activeCount()` for the threads. I don't know if this works if the code is using the older `thread` library. Also if by chance they are using a `multiprocessing.pool`, you could use the `_processes` attribute of a `Pool` object. – Paul Rooney Jun 13 '15 at 11:34
  • And for the processes "It's usually safer to log the pids of all your child processes when you create them" see [here](http://stackoverflow.com/questions/3162096/how-do-you-list-all-child-processes-in-python?lq=1) – Pynchia Jun 13 '15 at 11:41

0 Answers0