From 9e95f4b856d789c28d03da49525ae1a36f72e939 Mon Sep 17 00:00:00 2001 From: Jayanth Othayoth Date: Mon, 24 Jul 2017 06:42:24 -0500 Subject: Initial commit for dreport tool dreport tool is used to capture configuration and debug information from BMC. This tool can be used for BMC application and commandline. This commit enables dreport --help option. Change-Id: I451db96c6ec0ed901e1bc557c073b3c7c21c7171 Signed-off-by: Jayanth Othayoth --- dreport/dreport.sh | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100755 dreport/dreport.sh diff --git a/dreport/dreport.sh b/dreport/dreport.sh new file mode 100755 index 0000000..8dc1fca --- /dev/null +++ b/dreport/dreport.sh @@ -0,0 +1,47 @@ +#! /bin/bash + +help=$" + dreport creates an archive(xz compressed) consisting of the following: + * Configuration information + * Debug information + * A summary report + The type parameter controls the content of the data. The generated + archive is stored in the user specified location. + +usage: dreport [OPTION] + +Options: + -n, —-name Name to be used for the archive. + Default name format obmcdump__ + -d, —-dir Archive directory to copy the compressed report. + Default output directory is /tmp/dreport + -i, —-id Dump identifier to associate with the archive. + Identifiers include numeric characters. + Default dump identifier is 0 + -t, —-type Data collection type. Valid types are + "user", "core". + Default type is "user" initiated. + -f, —-file Optional file to be included in the archive. + Absolute path of the file must be passed as + parameter. This is useful to include application + core in the dump. + -s, --size Maximum allowed size(in KB) of the archive. + Report will be truncated in case size exceeds + this limit. Default size is 500KB. + -v, —-verbose Increase logging verbosity. + -V, --version Output version information. + -q, —-quiet Only log fatal errors to stderr + -h, —-help Display this help and exit. +" + +while [[ $# -ge 1 ]]; do + key="$1" + case $key in + -h|--help) + echo "$help" + exit;; + *) + echo "Unknown option $1. Display available options with -h or --help" + exit;; + esac +done -- cgit v1.2.1