summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJayanth Othayoth <ojayanth@in.ibm.com>2017-07-24 06:42:24 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-08-03 06:33:09 +0000
commit9e95f4b856d789c28d03da49525ae1a36f72e939 (patch)
tree06dafc7a0461cc0c77c375ea26899f63c524ff64
parentcc1a4230ee6fd06bc1f5c8ca9771cf4e61f4a2cd (diff)
downloadphosphor-debug-collector-9e95f4b856d789c28d03da49525ae1a36f72e939.tar.gz
phosphor-debug-collector-9e95f4b856d789c28d03da49525ae1a36f72e939.zip
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 <ojayanth@in.ibm.com>
-rwxr-xr-xdreport/dreport.sh47
1 files changed, 47 insertions, 0 deletions
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> Name to be used for the archive.
+ Default name format obmcdump_<id>_<epochtime>
+ -d, —-dir <directory> Archive directory to copy the compressed report.
+ Default output directory is /tmp/dreport
+ -i, —-id <id> Dump identifier to associate with the archive.
+ Identifiers include numeric characters.
+ Default dump identifier is 0
+ -t, —-type <type> Data collection type. Valid types are
+ "user", "core".
+ Default type is "user" initiated.
+ -f, —-file <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 <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
OpenPOWER on IntegriCloud