Info |
---|
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.
- Highly configurable (Parameters like period , time interval and processes to be monitored can be configured).
Code Flow
- The main code flow of CPU Procanalyzer -
draw.io Diagram |
---|
|
Gliffy Diagram |
---|
macroId | 56d27dde-f067-4bc6-b545-41e889243b3a |
---|
name | MAIN CODE FLOW.drawio |
---|
pagePinrevision | 21 |
---|
|
- To get the Load Averages Average information-
gliffy
macroId | 602eb8d7-8c6a-4d8a-9fdb-7e5fd6a8c5e4 |
---|
name | loadavg |
---|
pagePin | 2diagramName | loadavg.drawio |
---|
revision | 1 |
---|
|
- To get the Memory information-
draw.io Diagram |
---|
diagramName | mem info.drawio |
---|
revision |
---|
|
Gliffy Diagram |
---|
macroId | cd94e81d-2752-47c6-b981-beda29edbfbc |
---|
name | mem info |
---|
pagePin | 1 |
---|
|
- To get the Idle Percent Information-
Gliffy Diagramdrawio |
---|
namediagramName | idlepercent.drawio |
---|
pagePinrevision | 31 |
---|
|
How to
...
Launch
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
No Format |
---|
(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:
Image Removed
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)
Image Removed
Fig(b). System Level View
Image Removed
Fig(c). Process Level View
Image Removed
Fig(d). Process Level View
Image Removed
Fig(e). Thread Level View
Image Removed
...
File to configure process names to be monitored