From d6436633313daf9e40c798dea4396380425a2890 Mon Sep 17 00:00:00 2001 From: Rinku Kothiya Date: Wed, 25 Aug 2021 06:37:51 +0000 Subject: [PATCH] EOS-24059: Added helpful debug info in m0reportbug Displaying the size of live core dir before capturing the data is helpful if the size of directory is huge. Signed-off-by: Rinku Kothiya --- utils/m0reportbug | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/utils/m0reportbug b/utils/m0reportbug index a82c5709221..512eebb42c9 100755 --- a/utils/m0reportbug +++ b/utils/m0reportbug @@ -152,6 +152,12 @@ main() { echo "OK$(_time $t)" >&2 done + # Helps in debugging, If m0reportbug fails due to huge size + echo "du -sh $LIVE_CORE_DIR" >&2 + du_output=`du -sh "$LIVE_CORE_DIR" 2>&1` + echo "$du_output" >&2 + echo "The size of $LIVE_CORE_DIR is : $du_size" + # Create directory and put only latest files created into it. TEMP_WORKSPACE="$LIVE_CORE_DIR/tmpspace/" rm -rf "$TEMP_WORKSPACE"