0

I've had 'accton' (in package psacct-6.3.2-63.el6_3.3.x86_64) turned on as I want to be able to report on a particular process (so I've written a script that will take the psacct file and get the information I want).

What I've not been able to determine is how forked process time is handled in relation to the parent and children processes.
Thus the question is:
Does the parent process have the accumulated time of all the children as well as itself? Does this relationship differ between system, user and elapsed time?

In my circumstance it's fairly important to understand this behaviour between the children and parent process time.

Thanks in advance,
Sebastien

1 Answer 1

0

All the times are per-process (in older versions of Linux, they were per-thread). Metering starts when a process is forked, continues over all of its execs, and ends when it exits. Times from its children are not included; they are available in the respective records for each child when the child exits. If you're using the acct_v3 format, the records include pid and ppid, so it's theoretically possible to reconstruct process trees and compute the equivalent of getrusage(RUSAGE_CHILDREN,...).

You must log in to answer this question.

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