# Send diagnostic information to Caplin Support

This page describes how to send diagnostics, logs, and configuration files for a Caplin component to Caplin Support.

## Requirements

To collate diagnostics for a Caplin component, you require:

* **Caplin Platform Diagnostics**. A set of open-source scripts provided by Caplin that collates diagnostic information on a running component or a core file.

  [icon:download[](https://github.com/caplin/caplin-platform-diagnostics/releases/latest) download] | [README](https://github.com/caplin/caplin-platform-diagnostics)
* **GNU Debugger** (`gdb` package) installed on the component’s host. Required by [Caplin Platform Diagnostics](https://github.com/caplin/caplin-platform-diagnostics) to generate and analyse core files.

  ```console
  $ sudo yum install gdb
  ```

## Collating diagnostics for a crashed component

Follow the steps below to send Caplin Support diagnostics for a crashed component:

1. If the crashed component dumped a core file, run the Caplin Platform Diagnostic’s `caplin-core-diagnostics.sh` script on the component’s host.

   **Syntax**

   ```
   caplin-core-diagnostics.sh __core__ [__binary__]
   ```

   **Example**

   ```console
   $ ./caplin-core-diagnostics.sh ~/dfw1/servers/Liberator/core.3581
   ```

   For full instructions and requirements, see the Caplin Platform Diagnostics [README](https://github.com/caplin/caplin-platform-diagnostics).
2. Create a single tar archive containing whichever of the diagnostic files below are present:

   |     |     |
   | --- | --- |
   | Caplin Platform Diagnostics output | `diagnostics-<host>-<core_file>-<timestamp>.tar.gz` |
   | JVM HotSpot error file | [component_working_dir](#working-directory-locations)/hs_err_pid&lt;pid>.log |
   | JVM heap dump | [component_working_dir](#working-directory-locations)/var/java_pid&lt;pid>.hprof |
   | JVM GC logs | [component_working_dir](#working-directory-locations)/var/gc.log.* |
   | Log files for the incident period | [component_working_dir](#working-directory-locations)/var/* |
   | Caplin configuration files | &lt;dfw_root>/global_config/*.conf<br> &lt;dfw_root>/global_config/overrides |
3. Log in to Caplin’s secure [File Upload Facility](/account/uploads) and upload the archive to Caplin Support.

## Collating diagnostics for a running component

Follow the steps below to send Caplin Support diagnostics for a running Caplin component (without terminating the component’s process):

1. Run the Caplin Platform Diagnostic’s `caplin-process-diagnostics.sh` script on the component’s host.

   **Syntax**

   ```
   caplin-process-diagnostics.sh __pid__
   ```

   **Example**

   ```console
   $ ./caplin-process-diagnostics.sh 3581
   ```

   For full instructions and requirements, see the Caplin Platform Diagnostics [README](https://github.com/caplin/caplin-platform-diagnostics).
2. Create a single tar archive containing whichever of the diagnostic files below are present:

   |     |     |
   | --- | --- |
   | Caplin Platform Diagnostics output | diagnostics-&lt;host>-&lt;binary>-&lt;pid>-&lt;timestamp>.tar.gz |
   | JVM GC logs | [component_working_dir](#working-directory-locations)/var/gc.log.* |
   | Log files for the incident period | [component_working_dir](#working-directory-locations)/var/* |
   | Caplin configuration files | &lt;dfw_root>/global_config/*.conf<br> &lt;dfw_root>/global_config/overrides |
3. Log in to Caplin’s secure [File Upload Facility](/account/uploads) and upload the archive to Caplin Support.

## Working directory locations

The location of a component’s working directory depends on whether it was deployed within or without a Caplin Deployment Framework.

**Components deployed within a Caplin Deployment Framework**

| Component | Working Directory |
| --- | --- |
| Liberator | &lt;dfw_root>/servers/Liberator/ |
| Transformer | &lt;dfw_root>/servers/Transformer/ |
| Integration adapter | &lt;dfw_root>/kits/&lt;blade_name>/&lt;version>/DataSource/ |

**Components deployed without a Caplin Deployment Framework**

| Component | Control script | Working Directory |
| --- | --- | --- |
| Liberator | &lt;deploy_root>/etc/rttpd | &lt;deploy_root> |
| Transformer | &lt;deploy_root>/etc/transformer | &lt;deploy_root> |
| UPAsrc adapter | &lt;deploy_root>/etc/upasrc | &lt;deploy_root> |
