Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Update README.md #6

Merged
merged 1 commit into from
Aug 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 2 additions & 74 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,74 +1,2 @@
# MemCapture

Memory capture and analysis tool for RDK

## Build

```shell
$ mkdir build && cd ./build
$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ make -j$(nproc)
```

## Run

```
Usage: MemCapture <option(s)>
Utility to capture memory statistics

-h, --help Print this help and exit
-o, --output-dir Directory to save results in
-j, --json Save data as JSON in addition to HTML report
-d, --duration Amount of time (in seconds) to capture data for. Default 30 seconds
-p, --platform Platform we're running on. Supported options = ['AMLOGIC', 'REALTEK', 'BROADCOM']. Defaults to Amlogic
-g, --groups Path to JSON file containing the group mappings (optional)
```

Example:

```shell
$ ./MemCapture --platform AMLOGIC --duration 30 --groups ./groups.json --output-dir /tmp/memcapture_results/
```

Averages are calculated over the specified duration.

### Process Grouping

To ease analysis, MemCapture supports grouping processes into categories. This is done by providing MemCapture with a
JSON file containing the groups and regexes defining which process(es) should belong to that group.

For example if the provided JSON file contained the below:

```json
{
"processes": [
{
"group": "Logging",
"processes": [
"syslog-ng",
"systemd-journald"
]
}
]
}
```

The `syslog-ng` and `systemd-journald` processes would belong to the `Logging` group and show up in the process list
with that group name.

An example file (`groups.example.json`) is provided in the repo.

### Results

By default, MemCapture will produce a file called `report.html` in the selected output directory. If no directory is provided, it
will create a `MemCaptureReport` subdirectory in the current working directory to save the files.

This report can be opened in any web browser and contains a summary view of all the metrics collected.

If the `-j` argument is provided to MemCapture, then an additional `results.json` file will be created. This contains the
raw data from MemCapture and is designed for importing into a backend system for analysis/reporting.

### Notes

Tool currently supports three platforms - `AMLOGIC` (default), `REALTEK` and `BROADCOM`. Not all stats are available on
all platforms
## This repository has moved
Future development will take place in RDKCentral: https://github.com/rdkcentral/MemCapture