That example is meant to be run from the POX CLI/interpreter (that is, it
expects you ran the "py" component), not as a standalone component.
You could turn it into a component with a little work (it has already been
discussed on the mailing list). However, there's a "Statistics Collector
Example" in the "Third Party" section of the manual wiki which has already done
this (and expanded on the original a bit).
Hope that helps.
-- Murphy
On Jul 29, 2013, at 9:26 AM, Kouvakas Alexandros wrote:
> Hello,
> I am trying to collect statistics from the ovs. I tried to run the Example -
> Web flow statistics but I get the following error
>
> [inria_nepi@planetlab2 pox]$ ./pox.py samples.pretty_log
> forwarding.l2_learning flow-stats
> POX 0.1.0 (betta) / Copyright 2011-2013 James McCauley, et al.
> Traceback (most recent call last):
> File "/home/inria_nepi/pox/pox/boot.py", line 89, in do_import2
> __import__(name, globals(), locals())
> File "/home/inria_nepi/pox/ext/flow-stats.py", line 2, in <module>
> log = core.getLogger("WebStats")
> NameError: name 'core' is not defined
> Could not import module: flow-stats
>
> I am using the betta branch, but I don't think it matters as I get the same
> error with carp branch.
>
> Does anybody knows what happens?
> Also every suggestion for modules that get statistics from the switch are
> very welcome.
>
> Thanks a lot!
>
>
>
> --
> Kouvakas Alexandros