Yanki Twizzy Yanki Twizzy - 1 year ago 62
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 Source

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

processes XXXX
Number of forks since boot.