Merge branch 'master' of ssh://git.onelab.eu/git/sliver-openvswitch
[sliver-openvswitch.git] / planetlab / exp-tool / Makefile
index bda2b09..e54d35b 100644 (file)
@@ -308,6 +308,23 @@ graph.dot:
 graph.ps: graph.dot
        dot -Tps < $^ > $@      
 
+####################
+# googlemap stuff
+# Uses:
+# GMAP_SERVER, the hostname that runs an ndnmap instance
+# GMAP_PROBES, a list of tuples of the form
+# <linkid>=<nodeid>=<internal_linkid>=<frequency>
+# e.g.
+# SENDER-MUX=SENDER=3=0.5
+# which would mean, the link 'SENDER-MUX' should be monitored at the 'SENDER' node and is coded 
+# in links.json with id=3, every half second
+# sliver-ovs gmap-probe is designed to run in background,
+# and so that a new run will kill any previously running instance
+gprobes: $(foreach probe,$(GMAP_PROBES),gprobe-$(probe))
+
+gprobe-%: FORCE
+       $(SSH) -n $(call solve,$(word 2,$(subst @, ,$(*F)))) $(SUDO) \
+       sliver-ovs gmap-probe L$(word 1,$(subst @, ,$(*F))) $(GMAP_SERVER) $(word 3,$(subst @, ,$(*F))) $(word 4,$(subst @, ,$(*F)))
 
 ####################
 # 'virtual' targets in that there's no real file attached