How does the TSCO Capacity (aka BPA) Agent installed on Unix handle and report child process CPU utilization?

Version 5
    Share This:

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    BMC Performance Assurance for Servers


    TrueSight Capacity Optimization all versions BMC Performance Assurance for Servers


       When collecting data on Unix there are two separate classes of CPU utilization values recorded for each process:    
    • The process' own CPU consumption (CPU User Time, CPU System Time)
    • The CPU consumed by its terminated children (Child CPU User Time, Child CPU System Time)
    The Child CPU utilization values are visible in Investigate through the Process Statistics drill down, in the raw UDR data itself (using a tool such as UDRviewer), and in the Analyze .anr report. This information is used to enhance distribution of CPU resources consumed by processes that we didn't see, or missed at least part of their CPU consumption.   
         NOTE: This document was originally published as Solution SLN000000146810.    
    • BMC Performance Assurance for Unix  7.4.10,  7.4.00,  7.3.00
    • Unix



    Legacy ID:KA310255


    Section I: Definition of Child CPU

       The reported definition of Child CPU is: "Measure of processor time used by the terminated descendants of the current process". The Child CPU field for a process represents the CPU User and System timed used by child processes that are no longer running. When a Child process exits, whatever CPU it consumed is added to the Child CPU field of its parent process.   
    For example, the following is a process tree snapshot:   
        PID 100 - Processor Time 100 seconds    
                   Child CPU   0 seconds    
      -> Pid 101 (child) - Processor Time 50 seconds    
      -> Pid 102 (child) - Processor Time 50 seconds   
    In the above example, the child CPU of the Parent process is currently 0, which means either it has no child processes or none of its child processes have terminated yet.   
    The same process tree with no additional CPU consumption is shown below after one child process terminates (PID 101):   
        PID 100 - Processor Time 100 seconds    
                   Child CPU  50 seconds    
      -> Pid 102 (child) - Processor Time 50 seconds   
    The Child CPU of PID 100 is '50' because one of its child processes has exited and its CPU consumption has been added to the 'Child CPU' field of its parent.   
    The 'Child CPU' field in a parent is only updated when a child process exits. Because of this, the 'Child CPU' of a process will be unrelated to the CPU consumption of its currently living children. It represents the CPU consumption of child processes that have started and stopped.   
    Following is another example that shows 'Child CPU':   
    Data Sample 1:   
        PID 100 - Processor Time 100 seconds    
                   Child CPU   0 seconds    
      -> Pid 101 (child) - Processor Time 50 seconds    
      -> Pid 102 (child) - Processor Time 50 seconds   
    Data Sample 2:   
        PID 100 - Processor Time 100 seconds    
                   Child CPU  75 seconds    
      -> Pid 102 (child) - Processor Time 50 seconds   
    In the above scenario, one child in the first sample has exited. In the first sample, child process with PID 101 had consumed 50 seconds of CPU. In sample 2 child process with PID 101 has terminated, and Child CPU has increased by 75 seconds. This means one of the following two scenarios occurred:    
    1. Child process with PID 101 consumed an additional 25 seconds of CPU after the first sample before the process exited.
    3. Child process with PID 101 consumed from 0 to 25 seconds of additional CPU after the first sample, and the parent process spawned additional child processes after the first sample that consumed a total of 0 to 25 seconds of CPU and exited before the second sample.
    In this case it is unknown exactly which process consumed the 25 seconds of Child CPU.   

    Section II: Reported Child CPU in Perform Analyze

       At the process level, two different types of CPU utilization are tracked that include the CPU utilization of the process itself and the sum of the CPU utilization of all its children. The second type (sum of child CPU) is called the Child Resource Utilization (CRU). When a process with a known parent is no longer running on the system Perform closes the process record in the UDR data. This closed record includes the total amount of CPU the process consumed and the amount of CRU assigned to its parent at the time the process record was closed.   
    When Analyze processes the UDR data a list of parent/child relationships is built. Analyze then calculates the total amount of CPU used by each process taking the Child Resource Utilization counters into consideration. If during a specific interval a child process running reports 1 second of CPU consumption but the Child Resource Utilization of the parent process is 5 seconds during that same interval Analyze assigns 5 seconds of CPU to the child process. Analyze adds this to the child CPU Utilization because in most cases the missed child processes are the same type of process as the child process that was captured in the interval. Also, by assigning the Child Resource Utilization to a process' siblings the utilization will fall into the correct workload if the workload is created with the 'include children' rule.   
    Child Process CPU in Perform can be found in the resulting *.anr file after processing data in Analyze. The *.anr file is located in the same directory as the Analyze commands file (*.an). Sample output from the *.anr file showing child CPU follows:   
        ------------ Process Tree ------- node: r61 ----------------    
    ---PID---         Proc Name    CPU(sec)  Child(sec)    Proc    
    138812             kbiod    0.000000    0.000000    0.000000    
    138298             rtcmd    0.000000    0.000000    0.000000    
    6480               lvmbb    0.000000    0.000000    0.000000    
    4386               xmgc     0.010000    0.000000    0.010000    
    4128               gil      1.710000    0.000000    1.710000    
    1                  init     0.060000   1349.710000  0.060000   
    Related Products:  
    1. BMC Performance Assurance for Servers


    Article Number:


    Article Type:


      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles