Why the values of fork and exec stats shown on the kernel internal stats of nmon utility in AIX systems (k option) are so different?

Usually the shown fork value is greater than the exec value, varying from 30% to 100% greater, it's rarely smaller, but it happends too.

Shouldn't they be the same or almost the same value along time? Are there ways to track which processes are being forked and executed?

  • 1
    running from a shell nohup nice sleep 1 would generate one fork and 3 exec. Now an apache httpd server (pre-fork mode) would generate probably mostly forks, since httpd only has to fork to create/recycle "workers". – A.B Jul 31 '18 at 18:25
  • So, I bet that external calls using system() would call exec at least twice. Right? – Luciano Jul 31 '18 at 18:28
  • probably (sh + actual command, along the initial fork and the command fork too). Now I don't have any particular knowledge on AIX tools to track this. It would probably fall in the umbrella of process accounting and auditing – A.B Jul 31 '18 at 18:30
  • Your comment actually answered the question, thanks. – Luciano Jul 31 '18 at 18:32

Your Answer

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

Browse other questions tagged or ask your own question.