diff options
author | Marri Devender Rao <devenrao@in.ibm.com> | 2018-11-12 07:45:54 -0600 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-01-22 21:57:01 +0000 |
commit | 0deb287cc1cd0acccc38e9333a87842134e87be3 (patch) | |
tree | 39657b4f568909f08ef25add7906fd9bf42bddc5 /tools/dreport.d/dreport | |
parent | e57ee7623b4e4a5e6987879548ce4f201eabe685 (diff) | |
download | phosphor-debug-collector-0deb287cc1cd0acccc38e9333a87842134e87be3.tar.gz phosphor-debug-collector-0deb287cc1cd0acccc38e9333a87842134e87be3.zip |
Refactor to pass errors to watch through config YAML
Add errors to watch for through error YAML file
Add support for checkstop error type
Tested:
Generating dumps for elog, core, checkstop type errors.
Change-Id: Idd00ace2e3d0c472a74ec142e6d150e55e843a6f
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
Diffstat (limited to 'tools/dreport.d/dreport')
-rwxr-xr-x | tools/dreport.d/dreport | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/dreport.d/dreport b/tools/dreport.d/dreport index 7fc1c32..3b6dce3 100755 --- a/tools/dreport.d/dreport +++ b/tools/dreport.d/dreport @@ -43,6 +43,7 @@ declare -rx SUMMARY_DUMP="summary" declare -rx TYPE_USER="user" declare -rx TYPE_CORE="core" declare -rx TYPE_ELOG="elog" +declare -rx TYPE_CHECKSTOP="checkstop" declare -rx SUMMARY_LOG="summary.log" declare -rx DREPORT_LOG="dreport.log" declare -rx TMP_DIR="/tmp" @@ -94,6 +95,11 @@ function collect_data() elog_id=$(basename "$optional_path") set_elog_pid ;; + $TYPE_CHECKSTOP) + log_summary "CHECKSTOP: $optional_path" + elog_id=$(basename "$optional_path") + set_elog_pid + ;; $SUMMARY_DUMP) #No data collection is required. @@ -190,7 +196,8 @@ function initialize() #Type if [[ !($dump_type = $TYPE_USER || \ $dump_type = $TYPE_CORE || \ - $dump_type = $TYPE_ELOG) ]]; then + $dump_type = $TYPE_ELOG || \ + $dump_type = $TYPE_CHECKSTOP) ]]; then log_error "Invalid -type, Only summary log is available" dump_type=$SUMMARY_DUMP fi |