From d8166111d65e77c7358814d4e741f0cce21d9765 Mon Sep 17 00:00:00 2001 From: Jayanth Othayoth Date: Thu, 2 Nov 2017 22:52:18 -0500 Subject: ffdc: Enable dreport based ffdc debug data collection Enabled dreport based debug data collection by default in the ffdc tool. Added -D option to disable the dreport based data collection and switch back to ffdc way. Change-Id: I429533d3d04495ea3cda2bcb2b1090f1d971d530 Signed-off-by: Jayanth Othayoth --- ffdc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ffdc b/ffdc index 6c32abc..3c93fe4 100644 --- a/ffdc +++ b/ffdc @@ -9,6 +9,7 @@ usage: ffdc [OPTION] Options: -d, --dir Specify destination directory. Defaults to /tmp if invalid or unspecified. + -D, --disable_dreport Disable dreport based dump collection -h, --help Display this help text and exit. ' @@ -38,6 +39,7 @@ declare -a arr=( dir=$"ffdc_$(date +"%Y-%m-%d_%H-%M-%S")" dest="/tmp" +disable_dreport=false while [[ $# -gt 0 ]]; do key="$1" @@ -52,6 +54,10 @@ while [[ $# -gt 0 ]]; do fi shift 2 ;; + -D|--disable_dreport) + disable_dreport=true + shift + ;; -h|--help) echo "$help" exit @@ -65,6 +71,11 @@ done echo "Using destination directory $dest" +if [ $disable_dreport = false ]; then + dreport -d $dest -v + exit +fi + mkdir -p "$dest/$dir" for ((i=0;i<${#arr[@]};i+=2)); do -- cgit v1.2.1