From 3602b502f4b81229ef076cff1a055018d6c532e7 Mon Sep 17 00:00:00 2001 From: Pragyansh Chaturvedi Date: Sun, 30 Nov 2025 05:34:08 +0530 Subject: [PATCH] Add steps to run container-example in BCC-Examples/README.md --- BCC-Examples/README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/BCC-Examples/README.md b/BCC-Examples/README.md index 6f7ebde..52cf52b 100644 --- a/BCC-Examples/README.md +++ b/BCC-Examples/README.md @@ -7,15 +7,24 @@ This folder contains examples of BCC tutorial examples that have been ported to - You will also need `matplotlib` for vfsreadlat.py example. - You will also need `rich` for vfsreadlat_rich.py example. - You will also need `plotly` and `dash` for vfsreadlat_plotly.py example. +- All of these are added to `requirements.txt` file. You can install them using the following command: + ```bash + pip install -r requirements.txt + ``` ## Usage - You'll need root privileges to run these examples. If you are using a virtualenv, use the following command to run the scripts: ```bash sudo /bin/python3 .py ``` -- For the disksnoop and container-monitor examples, you need to generate the vmlinux.py file first. +- For the disksnoop and container-monitor examples, you need to generate the vmlinux.py file first. Follow the instructions in the [main README](https://github.com/pythonbpf/Python-BPF/tree/master?tab=readme-ov-file#first-generate-the-vmlinuxpy-file-for-your-kernel) to generate the vmlinux.py file. - For vfsreadlat_plotly.py, run the following command to start the Dash server: ```bash sudo /bin/python3 vfsreadlat_plotly/bpf_program.py ``` Then open your web browser and navigate to the given URL. +- For container-monitor, you need to first copy the vmlinux.py to `container-monitor/` directory. + Then run the following command to run the example: + ```bash + sudo /bin/python3 container-monitor/container_monitor.py + ```