diff options
author | Jayanth Othayoth <ojayanth@in.ibm.com> | 2017-11-02 22:52:18 -0500 |
---|---|---|
committer | Jayanth Othayoth <ojayanth@in.ibm.com> | 2017-11-07 00:16:59 -0600 |
commit | d8166111d65e77c7358814d4e741f0cce21d9765 (patch) | |
tree | 9ea062ed90441ced7f22d316f28dbf456131729c | |
parent | 8c996505018e8d63cb6115592ef0ee88fa8df4a9 (diff) | |
download | phosphor-debug-collector-d8166111d65e77c7358814d4e741f0cce21d9765.tar.gz phosphor-debug-collector-d8166111d65e77c7358814d4e741f0cce21d9765.zip |
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 <ojayanth@in.ibm.com>
-rw-r--r-- | ffdc | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -9,6 +9,7 @@ usage: ffdc [OPTION] Options: -d, --dir <directory> 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 |