We are using ant as build system that calls different other tools (Java tools, Python scripts, Perl scripts, LaTeX and so on). Now I would like to know how many processes have been created during the whole compilation run.

I'm looking for an easy to count the number of processes that have been used during the time I compile code.

Is there such a utility and how will you use it for this purpose?

  • 1
    If it is just you on the machine, just track starting/endign process ID number. Otherwise something like /usr/bin/time -v (gives different output from plain built-in time) may be of interest to you – ivanivan Mar 8 '18 at 16:46

The answer depends on what you mean by "process".

If you mean a call of a tool, then you might either write wrapper scripts which count up some bookkeeping variable or try to find some stats tool, like https://github.com/codehaus/antomology, or log the ant run and parse that output.

If you mean system calls you might either look for a profiling tool which keep this statistics or try a kernel trace and try to extract and count the system calls for process creation.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.