

# Retrieving AWS CloudHSM client configuration logs
<a name="troubleshooting-log-collection-script"></a>

AWS CloudHSM offers tools for Client SDK 3 and Client SDK 5 to gather information about your environment for AWS Support to troubleshoot problems. 

**Topics**
+ [AWS CloudHSM Client SDK 5 support tool](support-tool-sdk5.md)
+ [AWS CloudHSM Client SDK 3 support tool](support-tool-sdk3.md)

# AWS CloudHSM Client SDK 5 support tool
<a name="support-tool-sdk5"></a>

The script for AWS CloudHSM Client SDK 5 extracts the following information:
+ The configuration file for the Client SDK 5 component
+ Available log files
+ Current version of the operating system
+ Package information

## Running the info tool for Client SDK 5
<a name="running-sdk5"></a>

Client SDK 5 includes a client support tool for each component, but all tools function the same. Run the tool to create an output file with all the gathered information. 

The tools use a syntax like this: 

```
[ pkcs11 | dyn | jce | ksp | cli]_info
```

For example, to gather information for support from a Linux host running PKCS \$111 library and have the system write to the default directory, you would run this command: 

```
/opt/cloudhsm/bin/pkcs11_info
```

The tool creates the output file inside the `/tmp` directory.

------
#### [ AWS CloudHSM CLI ]

**To gather support data for AWS CloudHSM CLI on Linux**
+  Use the support tool to gather data. 

  ```
  /opt/cloudhsm/bin/cli_info
  ```

**To gather support data for AWS CloudHSM on Windows**
+  Use the support tool to gather data. 

  ```
  PS C:\> & "C:\Program Files\Amazon\CloudHSM\bin\cli_info.exe"
  ```

------
#### [ PKCS \$111 library ]

**To gather support data for PKCS \$111 library on Linux**
+  Use the support tool to gather data. 

  ```
  /opt/cloudhsm/bin/pkcs11_info
  ```

**To gather support data for PKCS \$111 library on Windows**
+  Use the support tool to gather data. 

  ```
  PS C:\> & "C:\Program Files\Amazon\CloudHSM\bin\pkcs11_info.exe"
  ```

------
#### [ OpenSSL Dynamic Engine ]

**To gather support data for OpenSSL Dynamic Engine on Linux**
+  Use the support tool to gather data. 

  ```
  /opt/cloudhsm/bin/dyn_info
  ```

------
#### [ JCE provider ]

**To gather support data for JCE provider on Linux**
+  Use the support tool to gather data. 

  ```
  /opt/cloudhsm/bin/jce_info
  ```

**To gather support data for JCE provider on Windows**
+  Use the support tool to gather data. 

  ```
  PS C:\> & "C:\Program Files\Amazon\CloudHSM\bin\jce_info.exe"
  ```

------
#### [ Key Storage Provider ]

**To gather support data for Key Storage Provider on Windows**
+  Use the support tool to gather data. 

  ```
  PS C:\> & "C:\Program Files\Amazon\CloudHSM\bin\ksp_info.exe"
  ```

------

## Retrieving logs from a serverless environment
<a name="serverless-logs-sdk5"></a>

To configure for serverless environments, like Fargate or Lambda, we recommend you configure your AWS CloudHSM log type to `term`. Once configured to `term`, the serverless environment will be able to output to CloudWatch.

To get the client logs from CloudWatch, see [Working with log groups and log streams](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html) in the Amazon CloudWatch Logs User Guide.

# AWS CloudHSM Client SDK 3 support tool
<a name="support-tool-sdk3"></a>

The script for the AWS CloudHSM Client SDK 3 extracts the following information:
+ Operating system and its current version
+ Client configuration information from `cloudhsm_client.cfg`, `cloudhsm_mgmt_util.cfg`, and `application.cfg` files
+ Client logs from the location specific to the platform
+ Cluster and HSM information by using cloudhsm\$1mgmt\$1util
+ OpenSSL information
+ Current client and build version
+ Installer version

## Running the info tool for Client SDK 3
<a name="running-script"></a>

The script creates an output file with all the gathered information. The script creates the output file inside the `/tmp` directory.

**Linux**: `/opt/cloudhsm/bin/client_info`

**Windows**: `C:\Program Files\Amazon\CloudHSM\client_info`

**Warning**  
This script has a known issue for Client SDK 3 versions 3.1.0 through 3.3.1. We strongly recommend you upgrade to version 3.3.2 which includes a fix for this issue. Please refer to the [Known Issues](https://docs.aws.amazon.com/cloudhsm/latest/userguide/ki-all.html#ki-all-9) page for more information before using this tool.