Retrieve PCUI and Amazon ParallelCluster runtime logs
Learn how to retrieve the PCUI and Amazon ParallelCluster runtime logs for troubleshooting. To start, find the relevant PCUI and Amazon ParallelCluster stack names. Use the stack name to locate the installation log groups. To finish, export the logs. These logs are specific to the Amazon ParallelCluster runtime. For cluster logs, see Retrieving and preserving logs.
Prerequisites
-
The Amazon CLI is installed.
-
You have credentials to run Amazon CLI commands on the Amazon Web Services account that the PCUI is on.
-
You can access the Amazon CloudWatch console on the Amazon Web Services account that the PCUI is on.
Step 1: Locate the stack names for the relevant stacks
In the following example, replace the red highlighted text with your actual values.
List the stacks, using the Amazon Web Services Region where you installed the PCUI:
$
aws cloudformation list-stacks --region
aws-region-id
Note the stack names for the following stacks:
-
The name of the stack that deployed the PCUI on your account. You entered this name when you installed the PCUI; for example,
pcluster-ui
. -
The Amazon ParallelCluster stack that is prefixed with the stack name you entered; for example,
pcluster-ui-ParallelClusterApi-ABCD1234EFGH
.
Step 2: Locate the log groups
List the log groups of the PCUI stack, as shown in the following example:
$
aws cloudformation describe-stack-resources \ --region
aws-region-id
\ --stack-namepcluster-ui
\ --query "StackResources[?ResourceType == 'AWS::Logs::LogGroup' && (LogicalResourceId == 'ApiGatewayAccessLog' || LogicalResourceId == 'ParallelClusterUILambdaLogGroup')].PhysicalResourceId" \ --output text
List the log groups of the Amazon ParallelCluster API stack, as shown in the following example:
$
aws cloudformation describe-stack-resources \ --region
aws-region-id
\ --stack-namepcluster-ui-ParallelCluster-Api-ABCD1234EFGH
\ --query "StackResources[?ResourceType == 'AWS::Logs::LogGroup' && LogicalResourceId == 'ParallelClusterFunctionLogGroup'].PhysicalResourceId" \ --output text
Note the lists of log groups for use in the next step.
Step 3: Export the logs
Use the following steps to gather and export the logs:
-
Log in to the Amazon Web Services Management Console, and then navigate to the Amazon CloudWatch
console on the Amazon Web Services account that the PCUI is on. -
Choose Logs, Logs Insights in the navigation pane.
-
Select all of the log groups listed in the previous step.
-
Choose a time range, such as 12 hours.
-
Run the following query:
$
fields @timestamp, @message | sort @timestamp desc | limit 10000
-
Choose Export results, Download table (JSON).