Yanki Twizzy Yanki Twizzy - 15 days ago 5
Linux Question

How do I get the no of processes that have been created since the last boot on a Linux machine

How do I get the no of processes that have been created since the last boot on a Linux machine.

I want to use it in a C++ program so I prefer just knowing which proc file has it

Answer

If you want to know the number of forks there is /proc/stat:

processes XXXX
Number of forks since boot.
Comments