You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

This page is under development


Introduction

RDK PROC ANALYZER is a tool that enables different teams like development, triage and testing to analyze the CPU and memory utilization of the processes that run on top of RDK framework. It helps us in detecting the memory leaks, cpu and memory performance regressions. This tool is implemented as a service  and is also highly configurable (Parameters like period , time interval and processes to be monitored can be configured).

Code Flow

  • The main code flow of CPU Procanalyzer -

MAIN CODE FLOW


  • To get the Load Averages information- 

loadavg

  •  To get the Memory information- 


mem info

  • To get the Idle Percent Information-

idlepercent

How to Run:

This tool runs as a service.

If the file /tmp/PROC_ANALYZER_ENABLE is touched the tool starts running and it logs the details.

How to Configure:

1.Open  ‘/opt/rmfconfig.ini’ file on the device.

Parameters that can be configured:

                   (a)Time Interval

                   (b)Period

                   (c)Enable Dynamic

(a)Time Interval : It is the amount of time the tool runs.

(b)Period : It is the interval of time for which the tool records the information.

(c)Enable Dynamic: This is a flag to disable and enable the capturing of dynamic processes.

( Enable Dynamic = 1 means enable and Enable Dynamic =0 means disable ).

It would take the default values if not configured (sleepsecs:60, Time to run:0, Dynamic:1)

 Ex: FEATURE.CPUPROCANALYZER. SLEEP.SECS=60

       FEATURE.CPUPROCANALYER.TIMETORUN.SECS = 0 (which means tool runs until it is killed manually)

       FEATURE.CPUPROCANALYZER.DYNAMIC = 1

2.Open ‘/opt/processes.list’ file on the device.

Parameters that can be configured are the processes to be captured

Open the file and mention the names of processes to be captured.

How to view results:

Open /opt/logs/

Download the cpuprocanalyzer folder from it and this should be given as an input to the Visualizer which gives us several customized views which makes our analysis easier.

Note : Input log file should be in zip.

Visualizer:

Visualizer is a simple html file.( Load Visualizer.html file from the RDK-Visualizer.zip folder)

There are two ways of triggering the visualizer:

     1.We can run the html file on our local machine.

     2.We can trigger it from STBIT (Note : Not available as of now , it is still in progress)

        STBIT Operations in STBIT tool has an option called the RDK Proc Analyser, by selecting this ,Visualizer can be triggered.

 Visualizer has four options available namely System, Process, Thread and Dynamic.

 1.System: It gives us the plots of system level statistics of cpu and memory utilization.

 2.Process: It has two kinds of views.

                   It has two dropdowns available one to choose the parameter and the other to choose the process.

                   If no process is chosen it gives the plot of top processes of the selected parameter and any process is chosen it gives

                   us the plot of the chosen process of particular parameter.

3.Thread: It also has two dropdowns one to choose the process and the other to choose the thread.

                 This gives the cpu utilization of selected thread of the selected process.

4.Dynamic: This view shows us the memory statistics of the dynamic processes in a tabular format.

Snapshots of Visualizer:

                                                  Fig(a). Basic layout of the visualizer

Once we run the html file we obtain the above page which has a upload button which allows us to choose the zip file(rdk_logs.zip file)


                                                   Fig(b). System Level View


                                                       Fig(c). Process Level View


                                                      Fig(d). Process Level View


                                                        Fig(e). Thread Level View


                                                      Fig(f). Dynamic Process View












  • No labels