added bonding info to ctdb_diagnostics
authorAndrew Tridgell <tridge@samba.org>
Mon, 29 Oct 2007 23:18:52 +0000 (10:18 +1100)
committerAndrew Tridgell <tridge@samba.org>
Mon, 29 Oct 2007 23:18:52 +0000 (10:18 +1100)
(This used to be ctdb commit 71b5fc434bc5d88eb0669ee29aa932ba12737e07)

ctdb/tools/ctdb_diagnostics

index 989fac4685a268037fbb9429475f09de5e082cff..f302219398bfd5e7dd65ece9fb72b8b105871d52 100755 (executable)
@@ -29,8 +29,8 @@ show_file() {
     fname="$1"
     echo "  ================================"
     echo "  File: $fname"
-    echo "  `ls -l $fname`"
-    cat "$fname" | sed 's/^/  /'
+    echo "  `ls -l $fname 2>&1`"
+    cat "$fname" 2>&1 | sed 's/^/  /'
     echo "  ================================"
 }
 
@@ -57,14 +57,14 @@ EOF
 for f in $CONFIG_FILES; do
  [ -r "$f" ] || {
     error "$f is missing"
-    next;
+    continue;
  }
  show_file $f
  for i in `seq 0 $MAX_NODE`; do
      echo "Testing for same config file $f on node $i"
      tmpf=/tmp/`basename $f`.node$i
-     onnode $i cat $f > $tmpf
-     cmp $f $tmpf || {
+     onnode $i cat $f > $tmpf 2>&1
+     cmp $f $tmpf 2>&1 || {
         error "File $f is different on node $i"
         diff -u $f $tmpf
      }
@@ -127,6 +127,7 @@ show_all "/sbin/ifconfig -a"
 show_all "/sbin/ip addr list"
 show_all "/sbin/route -n"
 show_all "netstat -s"
+show_all "free"
 show_all "crontab -l"
 show_all "sysctl -a"
 show_all "/sbin/iptables -L -n"
@@ -144,6 +145,11 @@ show_all "/usr/sbin/nfsstat -v"
 [ -x /usr/sbin/getenforce ] && {
     show_all "/usr/sbin/getenforce"
 }
+[ -d /proc/net/bonding ] && {
+    for f in /proc/net/bonding/*; do
+       show_all "cat $f"
+    done
+}
 
 [ -d /usr/lpp/mmfs ] && {
 cat <<EOF