Version 7 (modified by Fraida Fund, 6 years ago) (diff)



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")

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

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

  ...['oml'].inject("sent", [str(pkt_id),['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.