0

I think that the number of processes forked per sec is a bit too high on one of the servers. How can I monitor what processes are spawned? Is there any tool that can help me? I know I can strace a specific process looking for fork(), but is there something similar that works system-wide?

I'd like to know at least the pid (and name) and it's ppid (and name of the parent).

I mean realtime monitoring of new fork()s, not a snapshot of what's available now.

1 Answer 1

0

I think that the number of processes forked per sec is a bit too high on one of the servers

I don't think so. As my understanding, all the child processes will be forked when the parent process starting. So, it's not too many as you think.

How can I monitor what processes are spawned?

You can do it by combination of ps and watch command (paging version):

watch 'ps -eo ppid,pid,comm --forest'
2
  • On the system I was having issues with, the fork rate is constantly around 60+ per second. Services running there don't pre-fork worker children. Additionally the spawned processes seem to get killed so fast they're hard to catch on ps (let alone a watched ps)
    – viraptor
    Aug 17, 2011 at 10:20
  • If it be killed so fast, then, AFAIK, there is no way, except strace.
    – quanta
    Aug 17, 2011 at 10:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .