... | ... | @@ -60,13 +60,17 @@ If logging is enabled, and you use the `simple_switch_CLI` when starting the top |
|
|
|
|
|
### Event logging
|
|
|
|
|
|
To enable event logging when starting your switch, use the *--nanolog* command line option. For example, to use the ipc address *ipc:///tmp/bm-log.ipc*:
|
|
|
To enable event logging when starting your switch, use the `--nanolog` command line option. For example, to use the *ipc* address `ipc:///tmp/bm-log.ipc`:
|
|
|
|
|
|
```bash
|
|
|
sudo ./simple_switch -i 0@<iface0> -i 1@<iface1> --nanolog ipc:///tmp/bm-log.ipc <path to JSON file>
|
|
|
```
|
|
|
|
|
|
Use [tools/nanomsg_client.py](https://github.com/p4lang/behavioral-model/blob/master/tools/nanomsg_client.py) as follows when the switch is running:
|
|
|
|
|
|
```bash
|
|
|
sudo ./nanomsg_client.py [--thrift-port <port>]
|
|
|
```
|
|
|
|
|
|
The script will display events of significance (table hits / misses, parser transitions, ...) for each packet.
|
|
|
|
... | ... | @@ -83,7 +87,9 @@ To enable the debugger, make sure that you passed the `--enable-debugger` flag t |
|
|
Use [tools/p4dbg.py](https://github.com/p4lang/behavioral-model/blob/master/tools/p4dbg.py) as follows when the switch is running to
|
|
|
attach the debugger to the switch:
|
|
|
|
|
|
sudo ./p4dbg.py [--thrift-port <port>]
|
|
|
```bash
|
|
|
sudo ./p4dbg.py [--thrift-port <port>]
|
|
|
```
|
|
|
|
|
|
You can find a P4 debugger user guide in the [BMv2 documentation](https://github.com/p4lang/behavioral-model/blob/master/docs/p4dbg_user_guide.md).
|
|
|
|
... | ... | |