]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cdebugpack: save some more info
authorYehuda Sadeh <yehuda@hq.newdream.net>
Thu, 7 Oct 2010 03:04:38 +0000 (20:04 -0700)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Thu, 7 Oct 2010 03:04:38 +0000 (20:04 -0700)
ceph.conf
ceph -s
ceph osd dump
ceph mds dump

src/cdebugpack.in

index 8f9932587bdfe6e86c61e45b7cfbb0604776a191..8f04812b415098e06f424fddb2017f14c38faba7 100644 (file)
@@ -26,6 +26,17 @@ usage_exit() {
     exit
 }
 
+wait_pid_exit() {
+       pid=$1
+
+       for i in {1..10}; do
+               [ -e /proc/$pid ] || return
+               sleep 1
+       done
+       echo Killing pid $pid
+       kill $pid
+}
+
 
 . $LIBDIR/ceph_common.sh
 
@@ -67,6 +78,7 @@ tmp_path_bin=$tmp_path/bin
 tmp_path_bin_dbg=$tmp_path/bin.dbg
 tmp_path_log=$tmp_path/out
 tmp_path_core=$tmp_path/core
+tmp_path_etc=$tmp_path/etc
 
 echo tmp_path=$tmp_path
 
@@ -74,6 +86,7 @@ mkdir -p $tmp_path_bin
 mkdir -p $tmp_path_bin_dbg
 mkdir -p $tmp_path_log
 mkdir -p $tmp_path_core
+mkdir -p $tmp_path_etc
 
 
 #copy the binaries
@@ -99,6 +112,17 @@ for path in $core_paths; do
   fi
 done
 
+# copy config
+cp $conf $tmp_path_etc
+
+# other output
+$BINDIR/ceph -s > $tmp_path_log/ceph-s &
+wait_pid_exit $!
+$BINDIR/ceph osd dump -o $tmp_path_log/ceph-osd-dump &
+wait_pid_exit $!
+$BINDIR/ceph mds dump -o $tmp_path_log/ceph-mds-dump &
+wait_pid_exit $!
+
 
 # now create a tarball