Skip to content

Commit 3602b50

Browse files
committed
Add steps to run container-example in BCC-Examples/README.md
1 parent 808db27 commit 3602b50

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

BCC-Examples/README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,24 @@ This folder contains examples of BCC tutorial examples that have been ported to
77
- You will also need `matplotlib` for vfsreadlat.py example.
88
- You will also need `rich` for vfsreadlat_rich.py example.
99
- You will also need `plotly` and `dash` for vfsreadlat_plotly.py example.
10+
- All of these are added to `requirements.txt` file. You can install them using the following command:
11+
```bash
12+
pip install -r requirements.txt
13+
```
1014

1115
## Usage
1216
- You'll need root privileges to run these examples. If you are using a virtualenv, use the following command to run the scripts:
1317
```bash
1418
sudo <path_to_virtualenv>/bin/python3 <script_name>.py
1519
```
16-
- For the disksnoop and container-monitor examples, you need to generate the vmlinux.py file first.
20+
- 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.
1721
- For vfsreadlat_plotly.py, run the following command to start the Dash server:
1822
```bash
1923
sudo <path_to_virtualenv>/bin/python3 vfsreadlat_plotly/bpf_program.py
2024
```
2125
Then open your web browser and navigate to the given URL.
26+
- For container-monitor, you need to first copy the vmlinux.py to `container-monitor/` directory.
27+
Then run the following command to run the example:
28+
```bash
29+
sudo <path_to_virtualenv>/bin/python3 container-monitor/container_monitor.py
30+
```

0 commit comments

Comments
 (0)