[P4-dev] nanolog problem

Antonin Bas antonin at barefootnetworks.com
Mon Apr 10 14:55:18 EDT 2017


bmv2 uses 2 nanomsg sockets:
1) the notifications socket (by
default ipc:///tmp/bmv2-<device-id>-notifications.ipc), which is used for
port events, learning notifications and table entry ageing notifications.
This is not used for logging.
2) the event logging socket (there is no default, it is disabled by

It seems that you want to use the second one. In this case you need to
follow the instructions in the README (
- start the switch with --nanolog ipc:///tmp/bmlog.ipc
- run nanomsg_client.py. *If the switch is run as root, this needs to be
run as root as well*, otherwise you will not see any messages. You do not
need to provide the nanomsg address (in this case ipc:///tmp/bmlog.ipc),
the client will retrieve it from the switch (assuming you are using the
default Thrift port).

On Mon, Apr 10, 2017 at 4:01 AM, yunchen chang <y2924uki at gmail.com> wrote:

> Hello everyone,
> I have some problems in the use of nanolog.
> I use l2_switch to be my target and use python code to start my mininet.
> I want to see the message in ipc, so I use
> ~/bmv2/tools$ ./nanomsg_client.py --socket ipc:///tmp/bmv2-0-
> notifications.ipc
> There is not any message.
> But the
> ~/bmv2/targets/l2_switch/learn_client$ sudo ./learn_client
> It still can receive message from bmv2-0-notifications.ipc
> --
> I received 2 samples
> Calling callback function
> CB with 2 samples
> ingress port is 1
> ingress port is 2
> --
> I can't figure out what happened.
> Thank you.
> Best regards,
> Abbie
> _______________________________________________
> P4-dev mailing list
> P4-dev at lists.p4.org
> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20170410/4239956f/attachment-0002.html>

More information about the P4-dev mailing list