chiark / gitweb /
Templates for scripts. Monitoring script. Do not depend on time of generation at...
[vinegar-ip.git] / on-dest.template
diff --git a/on-dest.template b/on-dest.template
new file mode 100644 (file)
index 0000000..07b6c06
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+# Received packets collection script.
+# Run this script on @@S as root, saying:
+#   ./on-dest.sh PART [<other tcpdump options>]
+# where PART ranges from 1 to 100
+
+if [ $# -lt 1 ]; then echo >&2 'PART?'; exit 1; fi
+part=$1; shift
+
+exec tcpdump -ps@@M -w recv-$part.pcap "$@" \
+ src host @@S and dst host @@D