From de43867780a4f32592d7b16b13ed9253b52b8fe2 Mon Sep 17 00:00:00 2001 From: Shubham Sharma Date: Sat, 10 Jun 2017 14:57:25 -0700 Subject: [PATCH 1/3] HAWQ-1480 - Added documentation for packcore utility --- .../source/subnavs/apache-hawq-nav.erb | 3 ++ markdown/admin/packcore.html.md.erb | 51 +++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 markdown/admin/packcore.html.md.erb diff --git a/book/master_middleman/source/subnavs/apache-hawq-nav.erb b/book/master_middleman/source/subnavs/apache-hawq-nav.erb index f18edef..95bccb8 100644 --- a/book/master_middleman/source/subnavs/apache-hawq-nav.erb +++ b/book/master_middleman/source/subnavs/apache-hawq-nav.erb @@ -117,6 +117,9 @@
  • HAWQ Administrative Log Files
  • +
  • + HAWQ packcore utility +
  • diff --git a/markdown/admin/packcore.html.md.erb b/markdown/admin/packcore.html.md.erb new file mode 100644 index 0000000..030628b --- /dev/null +++ b/markdown/admin/packcore.html.md.erb @@ -0,0 +1,51 @@ +--- +title: HAWQ packcore utility +--- + + + +## Core file + +Core file is a disk file that records the image of a process' memory in case the process crashes or terminates abruptly. This image can be later used to debug the state of process at the time when it was terminated. This information can be very useful to debug the cause failure. + +## Packcore + +Packcore utility helps in packing a core file with its context – executable, application and system shared libraries from the current environment. This information can be later unpacked on a different system and can be used for debugging. Packcore takes a core file, extracts the name of the binary which generated the core and executes `ldd` (List Dynamic Dependencies) to get the required information into a single tar archive. + +### Using packcore + +The packcore utility is located under `${GPHOME}/sbin`. Following are the options for packing a core file: + +```shell +$GPHOME/sbin/packcore + +or + +$GPHOME/sbin/packcore -b|--binary $GPHOME/bin/postgres +``` + +Alternatively, you can navigate to `$GPHOME/sbin` and run the following: + +```shell +./packcore + +or + +./packcore -b|--binary $GPHOME/bin/postgres +``` +Once finished the utility will create a tar file named `packcore-.tgz`. This file can be later unpacked on another system and used for debugging. From 646e060ca5f19619ac1ee6343e7a5538e377e71a Mon Sep 17 00:00:00 2001 From: Shubham Sharma Date: Tue, 26 Sep 2017 17:14:25 -0700 Subject: [PATCH 2/3] HAWQ-1480 - Incorporated review comments for packcore utility --- markdown/admin/packcore.html.md.erb | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/markdown/admin/packcore.html.md.erb b/markdown/admin/packcore.html.md.erb index 030628b..a34a722 100644 --- a/markdown/admin/packcore.html.md.erb +++ b/markdown/admin/packcore.html.md.erb @@ -21,31 +21,35 @@ under the License. ## Core file -Core file is a disk file that records the image of a process' memory in case the process crashes or terminates abruptly. This image can be later used to debug the state of process at the time when it was terminated. This information can be very useful to debug the cause failure. +A core file is a disk file that records the memory image of a running process in the event the process crashes or terminates abruptly. The information in this image is useful for debugging the state of a process at the time when it was terminated. ## Packcore -Packcore utility helps in packing a core file with its context – executable, application and system shared libraries from the current environment. This information can be later unpacked on a different system and can be used for debugging. Packcore takes a core file, extracts the name of the binary which generated the core and executes `ldd` (List Dynamic Dependencies) to get the required information into a single tar archive. +The packcore utility helps pack a core file with its context, including the executable, application, and shared system libraries from the current environment. This information can be unpacked for later debugging on a different system. Packcore extracts the name of the binary that generated the core from the core file, then executes ldd (List Dynamic Dependencies) to create a single tar archive containing the core file information. ### Using packcore -The packcore utility is located under `${GPHOME}/sbin`. Following are the options for packing a core file: +The packcore utility is located under `${GPHOME}/sbin`. Run one of the following commands to pack a core file: ```shell -$GPHOME/sbin/packcore +$ $GPHOME/sbin/packcore +``` -or +or -$GPHOME/sbin/packcore -b|--binary $GPHOME/bin/postgres +```shell +$ $GPHOME/sbin/packcore -b|--binary $GPHOME/bin/postgres ``` Alternatively, you can navigate to `$GPHOME/sbin` and run the following: ```shell -./packcore +$ ./packcore +``` or -./packcore -b|--binary $GPHOME/bin/postgres +```shell +$ ./packcore -b|--binary $GPHOME/bin/postgres ``` -Once finished the utility will create a tar file named `packcore-.tgz`. This file can be later unpacked on another system and used for debugging. +When processing is completed, the utility creates a tar file in the format: packcore-.tgz. Unpack this file on another system to use it for debugging. From 0f64ce660b866f3f7d31e79e1ca2241c17950c5b Mon Sep 17 00:00:00 2001 From: Shubham Sharma Date: Wed, 11 Oct 2017 23:03:26 -0700 Subject: [PATCH 3/3] HAWQ-1480 - Corrected heading format for packcore utility --- book/master_middleman/source/subnavs/apache-hawq-nav.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/master_middleman/source/subnavs/apache-hawq-nav.erb b/book/master_middleman/source/subnavs/apache-hawq-nav.erb index 95bccb8..a97450c 100644 --- a/book/master_middleman/source/subnavs/apache-hawq-nav.erb +++ b/book/master_middleman/source/subnavs/apache-hawq-nav.erb @@ -118,7 +118,7 @@ HAWQ Administrative Log Files
  • - HAWQ packcore utility + HAWQ Packcore Utility