wiki:GEC16Agenda/WiMAX-Tutorial/Coop/02

Previous

Instrumenting Coopshim with OML

The coopshim application is an AFFIX wrapper and is written in Python. After verifying that it works, we used the instructions on the oml4py library homepage to instrument the script. We set up measurement points (database tables) in the script. Some of the measurement tables we set up are:

  • req - used to store information about requests between nodes
  • recv - used to store information about recovered packets between nodes
  • sent - used to store information about recovery packets sent from nodes

They were set up in the Python application as follows:

from oml4py import OMLBase

class CoopShim(BaseShim):

  coop = {}

  coop['oml'] = OMLBase("coopshim")
  coop['oml'].addmp("req", "id:long total:long")
  coop['oml'].addmp("recv", "id:long total:long source:string")
  coop['oml'].addmp("sent", "id:long total:long dest:string")
  coop['oml'].start()


  ...

  self.coop['oml'].inject("req", [pkt_id, self.coop['n_req']])

  ...

  self.coop['oml'].inject("recv", [pkt_id, self.coop['n_recv'], str(srcip)])

  ... 

  self.coop['oml'].inject("sent", [str(pkt_id), self.coop['n_sent'], str(srcip)])


Note: In addition to the oml4py module for Python, there is also the oml4r gem for instrumenting Python applications, and a C library for C/C++ applications. There is also a text protocol which can be used with any language.


Next

Last modified 11 years ago Last modified on 07/22/13 21:11:29