Skip to content

adjacentlink/opentestpoint-probe-mgen

Repository files navigation

opentestpoint-probe-mgen

OpenTestPoint measurement probes for MGEN UDP and TCP flows.

  1. mgen command line must include txlog and flush.

  2. Probe communicates with an instance of mgen-monitor which tails and processes the mgen output file, responding to per connection status requests with per flow bytes and packets received, duplicate bytes and packets received, and accumulated latency --- as a delta since the last status report.

Sample otestpontd XML

<otestpoint id='node-1'
            discovery='localhost:8881'
            publish='localhost:8882'>
  <probe configuration="otestpoint-probe-mgen.xml">
    <python module="otestpoint.mgen.flows" class="Flows"/>
  </probe>
</otestpoint>

Sample probe XML

<otestpoint-probe-mgen monitor-address='localhost' monitor-port='8883'/>

Sample Tables Dump

[me@host]$ otestpoint-dump localhost:8882 MGEN

[1665431745] node-1/4 eff0df08-9650-4f44-ac66-df738d2b8e92
otestpoint.mgen.flows Measurement_mgen_flows_receive v1 1448 bytes
MGEN.Flows.Receive.node-1
[] flows_udp
|Src        |Dst       |Flow|Pkts|Bytes|Dup Pkts|Dup Bytes|Avg Latency          |
|10.100.0.1 |224.1.0.1 |1   |3   |384  |0       |0        |8.932749430338542e-05|
|10.100.0.3 |224.1.0.1 |1   |3   |384  |0       |0        |0.007623990376790364 |
|10.100.0.3 |10.100.0.1|101 |1   |128  |0       |0        |0.013534069061279297 |
|10.100.0.2 |224.1.0.1 |1   |3   |384  |0       |0        |0.014247735341389975 |
|10.100.0.2 |10.100.0.1|101 |1   |128  |0       |0        |0.0026950836181640625|
|10.100.0.7 |224.1.0.1 |1   |3   |384  |0       |0        |0.016728957494099934 |
|10.100.0.7 |10.100.0.1|101 |2   |256  |0       |0        |0.0022449493408203125|
|10.100.0.4 |224.1.0.1 |1   |3   |384  |0       |0        |0.02191774050394694  |
|10.100.0.4 |10.100.0.1|101 |1   |128  |0       |0        |0.04175305366516113  |
|10.100.0.6 |224.1.0.1 |1   |2   |256  |0       |0        |0.013116002082824707 |
|10.100.0.6 |10.100.0.1|101 |6   |768  |0       |0        |0.013260761896769205 |
|10.100.0.10|224.1.0.1 |1   |2   |256  |0       |0        |0.03540694713592529  |
|10.100.0.9 |224.1.0.1 |1   |2   |256  |0       |0        |0.010159969329833984 |
|10.100.0.9 |10.100.0.1|101 |1   |128  |0       |0        |0.20574307441711426  |
|10.100.0.5 |224.1.0.1 |1   |2   |256  |0       |0        |0.039399027824401855 |
|10.100.0.8 |224.1.0.1 |1   |2   |256  |0       |0        |0.06208312511444092  |
|10.100.0.8 |10.100.0.1|101 |1   |128  |0       |0        |0.011731863021850586 |
--
[] flows_tcp
|Src|Dst|Flow|Pkts|Bytes|Dup Pkts|Dup Bytes|Avg Latency|
--


[1665431745] node-1/4 eff0df08-9650-4f44-ac66-df738d2b8e92
otestpoint.mgen.flows Measurement_mgen_flows_transmit v1 470 bytes
MGEN.Flows.Transmit.node-1
[] flows_udp
|Src Port|Dst        |Flow|Pkts|Bytes|
|5001    |224.1.0.1  |1   |3   |384  |
|5001    |10.100.0.10|110 |2   |256  |
|5001    |10.100.0.6 |106 |4   |512  |
|5001    |10.100.0.4 |104 |1   |128  |
|5001    |10.100.0.9 |109 |1   |128  |
|5001    |10.100.0.11|111 |2   |256  |
|5001    |10.100.0.5 |105 |1   |128  |
|5001    |10.100.0.7 |107 |1   |128  |
|5001    |10.100.0.8 |108 |1   |128  |
--
[] flows_tcp
|Src Port|Dst|Flow|Pkts|Bytes|
--

mgen-monitor

$ mgen-monitor \
  -d \
  --log-file /path/to/var/log/mgen-monitor.log \
  --pid-file /path/to/var/run/mgen-monitor.pid \
  0.0.0.0
  8883
  /path/to/var/log/mgen.out