From 9ba08c22e807b8b3e744dc3146dbca4083e3e2f4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 6 May 2010 15:22:11 +0200 Subject: s4-devel: a useful script for giving DRS replication demos --- source4/scripting/devel/watch_servers.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 source4/scripting/devel/watch_servers.sh (limited to 'source4/scripting/devel') diff --git a/source4/scripting/devel/watch_servers.sh b/source4/scripting/devel/watch_servers.sh new file mode 100644 index 0000000000..48209cbe46 --- /dev/null +++ b/source4/scripting/devel/watch_servers.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +[ $# -ge 3 ] || { + echo "Usage: watch_servers.sh DB1 DB2 PASSWORD SEARCH " + exit 1 +} + +host1="$1" +host2="$2" +password="$3" +search="$4" +shift 4 + +watch -n1 "echo '$host1:'; bin/ldbsearch -S -H $host1 -Uadministrator%$password '$search' description $* | egrep -v '^ref|Ref|returned|entries|referrals' | uniq; echo; echo '$host2:'; bin/ldbsearch -S -H $host2 -Uadministrator%$password '$search' description $* | egrep -v '^ref|Ref|returned|entries|referrals' | uniq;" -- cgit