Monitoring and Troubleshooting EC2 Instances: Collecting Crash Dump Files

Collecting Crash Dump Files

Prev Question Next Question

Question

A start-up firm is using Amazon EC2 instance for web applications.

The IT Team is observing some of the EC2 instances unresponsive & remotely looking for the crash dump to diagnose further root cause.

Which of the following can be used for the collection of crash dump files?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer - C

For getting crash dump remotely for an unresponsive EC2 instance, EC2:SendDiagnosticInterrupt API can be used which based upon OS configuration can do multiple things like getting crash dump, obtain a backtrace, load a kernel replacement or restart a system.

Option A, B & D are incorrect as these are not the correct APIs to get crash dump.

For more information on Amazon EC2 instance Troubleshooting, refer to the following URL-

https://aws.amazon.com/blogs/aws/new-trigger-a-kernel-panic-to-diagnose-unresponsive-ec2-instances/

None of the provided options is correct as there are no EC2 APIs to generate crash dump data files. However, you can try the following steps to collect crash dump files:

  1. Enable crash dump collection: You need to enable crash dump collection on your EC2 instances by configuring the kernel parameter. For example, for CentOS, you can add the following line to the /etc/sysctl.conf file:
perl
kernel.core_pattern = /var/crash/core-%e-%s-%u-%g-%p-%t

This will generate a core dump file in the /var/crash directory when an application crashes.

  1. Analyze core dump file: After a crash, you can analyze the core dump file to diagnose the issue. You can use tools like GDB (GNU Debugger) to analyze the core dump file.

  2. Debug the issue: Once you have analyzed the core dump file, you can debug the issue and fix it.

In conclusion, there are no EC2 APIs to generate crash dump data files. You need to enable crash dump collection on your EC2 instances and analyze the core dump file to diagnose the issue.