[P4-dev] nanolog problem
y2924uki at gmail.com
Mon Apr 10 22:52:56 EDT 2017
Thanks for your help.
I forgot to run nanomsg_client.py as root.
On Tue, Apr 11, 2017 at 2:55 AM, Antonin Bas <antonin at barefootnetworks.com>
> 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 (https://github.com/p4lang/
> - 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-notification
>> 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,
>> P4-dev mailing list
>> P4-dev at lists.p4.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the P4-dev