Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HAWQ-1480 - Added documentation for packcore utility #123

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions book/master_middleman/source/subnavs/apache-hawq-nav.erb
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@
<li>
<a href="/docs/userguide/2.2.0.0-incubating/admin/logfiles.html">HAWQ Administrative Log Files</a>
</li>
<li>
<a href="/docs/userguide/2.2.0.0-incubating/admin/packcore.html">HAWQ Packcore Utility</a>
</li>
</ul>
</li>
<li class="has_submenu">
Expand Down
55 changes: 55 additions & 0 deletions markdown/admin/packcore.html.md.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
title: HAWQ packcore utility
---

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

## <a id="core_file_definition"></a>Core file

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.

## <a id="packcore_definition"></a>Packcore

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.

### <a id="using_packcore"></a>Using packcore

The packcore utility is located under `${GPHOME}/sbin`. Run one of the following commands to pack a core file:

```shell
$ $GPHOME/sbin/packcore <core_file>
```

or

```shell
$ $GPHOME/sbin/packcore -b|--binary $GPHOME/bin/postgres <core_file>
```

Alternatively, you can navigate to `$GPHOME/sbin` and run the following:

```shell
$ ./packcore <core_file>
```

or

```shell
$ ./packcore -b|--binary $GPHOME/bin/postgres <core_file>
```
When processing is completed, the utility creates a tar file in the format: packcore-<core_file>.tgz. Unpack this file on another system to use it for debugging.