Hi,

you are probably using the branch of the repository and not destiny. Take a
look at the first reply above, which explains that the monitoring component
is only on the Destiny branch, and how to get it.

(Using Destiny is suggested at this point, as it is more up-to-date version
of nox with several bug fixes and features. In any case, the example code in
"monitor" which you already looked at probably answers your question.)

2011/6/19 Min-Hyup KANG <kang-min-h...@hanmail.net>

>   Thanks for your kindness.
>
>
> But there is not exsisting monitoring.py of netapps/
>
> so there is existing some derectory in netapps as a below.
>
>
> """"
>
> src/nox/netapps# ls
>
> Makefile.am  __init__.py    bindings_storage  discovery     hoststate
>  networkstate  routing  switch_management  tablog  topology
>
> Makefile.in  authenticator  data              flow_fetcher  lavi
> route         storage  switchstats        tests   user_event_log
>
> """"
>
>
> additionally, I re-write some code(0xfffffff) in monitor.py refering mail.
> as a below,
>
>
> """
>
> def aggregate_timer(self, dpid):
>
>         flow = ofp_match()
>
>         #flow.wildcards = 0xffff
>
>         flow.wildcards = 0xffffffff
>
>         self.ctxt.send_aggregate_stats_request(dpid, flow,  0xff)
>
>         self.post_callback(MONITOR_TABLE_PERIOD, lambda :
> self.aggregate_timer(dpid))
> """
>
> 1.What does 0xfffffff mean ?
> and then, I re-run command.
>
> So, I can check below message.
> 00086|openflow-event|DBG:received stats reply from 002320c2f7b4
> Aggregate stats in from datapath 00:23:20:c2:f7:b4
> {'packet_cout' : 39L, 'byte_cout' : 3822L, 'flow_count':2L }
>
>
>
> --------- 원본 메일 ---------
>
> *보낸사람*: Kyriakos Zarifis <kyr.zari...@gmail.com>
> *받는사람* : Min-Hyup KANG <kang-min-h...@hanmail.net>
> *참조* : nox-dev@noxrepo.org
> *날짜*: 2011년 6월 20일 월요일, 15시 34분 01초 +0900
> *제목*: Re: [nox-dev] gathering status of Openflow Switch
> Hi,
>
> I was actually referring to netapps/monitoring/montoring.py, which is a
> more complete (and complicated) monitoring component, but it is the same
> idea. However the one you looked at might actually be a better example
> exactly because it is simpler, but still shows how to create and send switch
> query packets.
> The output you pasted looks okay
>
>
> 2011/6/19 Min-Hyup KANG 
> <kang-min-h...@hanmail.net<http://hanmail/mail/MailComposeFrame.daum?TO=kang-min-h...@hanmail.net>
> >
>
>>   Hi,
>>
>>
>> after I found monitoring.py,
>>
>> There is existing /src/nox/coreapps/examples/monitor.py.
>>
>> I think what you mean is /src/nox/coreapps/examples/monitor.py. right ?
>>
>>
>> so, I excuted monitor component.
>>
>>
>> I can check Table stats and Port stats, Aggregate stats as a below.
>>
>>
>> 00072|openflow-event|DBG:received stats reply from 002320ca92e0
>>
>> Table stats in from datapath 00:23:20:ca:92:e0
>>
>> hash2 : 0
>>
>> linear : 2
>>
>> 00073|openflow-event|DBG:received stats reply from 002320ca92e0
>>
>> Port stats in from datapath 00:23:20:ca:92:e0
>>
>> 1 : 4
>>
>> 2 : 4
>>
>> 00074|openflow-event|DBG:received stats reply from 002320ca92e0
>>
>> Aggregate stats in from datapath 00:23:20:ca:92:e0
>>
>> {'packet_count': 0L, 'byte_count': 0L, 'flow_count': 0L}
>>
>>
>>
>>
>> --------- 원본 메일 ---------
>>
>> *보낸사람*: Kyriakos Zarifis 
>> <kyr.zari...@gmail.com<http://hanmail/mail/MailComposeFrame.daum?TO=kyr.zari...@gmail.com>
>> >
>> *받는사람* : Min-Hyup KANG 
>> <kang-min-h...@hanmail.net<http://hanmail/mail/MailComposeFrame.daum?TO=kang-min-h...@hanmail.net>
>> >
>> *참조* : 
>> nox-dev@noxrepo.org<http://hanmail/mail/MailComposeFrame.daum?TO=nox-dev@noxrepo.org>
>> *날짜*: 2011년 6월 20일 월요일, 00시 35분 26초 +0900
>>
>> *제목*: Re: [nox-dev] gathering status of Openflow Switch
>>  Hi,
>>
>> the 'monitoring' component I was referring to, is under:
>> ** / src / nox / netapps / monitoring / monitoring.py**
>>
>> but on the Destiny branch of the repository (not Zaku which is the master
>> branch).
>> Follow the instructions here
>> http://noxrepo.org/noxwiki/index.php/NOX_Installation#Installation (where
>> it says "For a branch other than master"...)
>> to switch to Destiny.
>>
>>>  -> you mean pyswitch can gather status of flow, port  in switch, right
>>> ?
>>>
>>> and I think I should use  ofp_stats_request, ofp_stats_reply,
>>> ofp_desc_stats, ofp_port_stats_request, ofp_ports_stats etc of struct in
>>> openflow.h and core.py
>>>
>>
>> Exactly. You can see some example of how to build some messages in
>> 'monitoring.py'
>>
>>
>>
>>
>>
>>
>>
>> Best Regards,
>> Min-Hyup KANG
>>
>> <http://hanmail/mail/MailComposeFrame.daum?TO=kang-min-h...@hanmail.net>
>>
>
>
>
>
>
>
>
> Best Regards,
> Min-Hyup KANG
>
> <kang-min-h...@hanmail.net>
>
_______________________________________________
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev

Reply via email to