add arm/disarmall
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 15 Oct 2007 16:48:04 +0000 (16:48 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 15 Oct 2007 16:48:04 +0000 (16:48 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@2687 04897980-b3bd-0310-b5e0-8ef037075253

ltt-control/lttctl/Makefile.am
ltt-control/lttctl/ltt-armall.sh [new file with mode: 0755]
ltt-control/lttctl/ltt-disarmall.sh [new file with mode: 0755]

index 6a5180de2b3a678bff2f97b233d4245fad9ebc6e..d151bf6d68632607bc313bbd4d13bf13fb3349a6 100644 (file)
@@ -3,6 +3,21 @@
 AM_CFLAGS = -DPACKAGE_DATA_DIR=\""$(datadir)"\" -DPACKAGE_BIN_DIR=\""$(bindir)"\"
 
 bin_PROGRAMS = lttctl
+bin_SCRIPTS = ltt-armall ltt-disarmall
+CLEANFILES = $(bin_SCRIPTS)
+EXTRA_DIST = ltt-armall.sh ltt-disarmall.sh
+
+ltt-armall: ltt-armall.sh
+       rm -f ltt-armall
+       echo "#!"$(BASH) > ltt-armall
+       cat $(srcdir)/ltt-armall.sh >> ltt-armall
+       chmod ugo+x ltt-armall
+
+ltt-disarmall: ltt-disarmall.sh
+       rm -f ltt-disarmall
+       echo "#!"$(BASH) > ltt-disarmall
+       cat $(srcdir)/ltt-disarmall.sh >> ltt-disarmall
+       chmod ugo+x ltt-disarmall
 
 lttctl_SOURCES = \
        lttctl.c
diff --git a/ltt-control/lttctl/ltt-armall.sh b/ltt-control/lttctl/ltt-armall.sh
new file mode 100755 (executable)
index 0000000..0ec03f3
--- /dev/null
@@ -0,0 +1,11 @@
+#excluding core markers (already connected)
+#excluding locking markers (high traffic)
+echo Connecting all markers
+MARKERS=`cat /proc/ltt|grep -v %k|awk '{print $2}'|sort -u|grep -v ^core_|grep -v ^locking_`
+for a in $MARKERS; do echo Connecting $a; echo "connect $a default" > /proc/ltt > /proc/ltt; done
+
+#excluding locking markers (high traffic)
+#core markers must be armed
+echo Arming all markers
+MARKERS=`cat /proc/ltt|awk '{print $2}'|sort -u|grep -v ^locking_`
+for a in $MARKERS; do echo Arming $a; echo "arm $a" > /proc/ltt; done
diff --git a/ltt-control/lttctl/ltt-disarmall.sh b/ltt-control/lttctl/ltt-disarmall.sh
new file mode 100755 (executable)
index 0000000..c8718bf
--- /dev/null
@@ -0,0 +1,10 @@
+#excluding locking
+echo Disarming all markers
+MARKERS=`cat /proc/ltt|awk '{print $2}'|sort -u|grep -v ^locking_`
+for a in $MARKERS; do echo Disarming $a; echo "disarm $a" > /proc/ltt; done
+
+#excluding locking
+#excluding core markers, not connected to default.
+echo Disconnecting all markers
+MARKERS=`cat /proc/ltt|grep -v %k|awk '{print $2}'|sort -u|grep -v ^core_|grep -v ^locking_`
+for a in $MARKERS; do echo Disconnecting $a; echo "disconnect $a" > /proc/ltt; done
This page took 0.024964 seconds and 4 git commands to generate.