1

In my program I am spawning child processes by using fork and execv. I am saving the child PIDs in an array. How can I get information about the children by using these PIDs? I want to get information like how much memory and CPU they are using.

node ninja
  • 31,796
  • 59
  • 166
  • 254

1 Answers1

1

You could try to use the library libgtop or instead directly parse the contents of

/proc/PID/stat

Kristofer
  • 3,201
  • 23
  • 28
  • I'm not on OS X bout you could try to run system_profiler from command line and parse the output. Take a look at http://stackoverflow.com/questions/1702870/how-to-collect-system-info-in-osx-using-objective-c – Kristofer May 10 '11 at 11:57